{
  "entityType": "invoice",
  "title": "Invoice Details",
  "columns": 12,
  "styles": {
    "containerClass": "entity-container entity-p-4",
    "titleClass": "entity-title entity-text-primary entity-mb-4",
    "sectionClass": "entity-section entity-card entity-mb-4",
    "rowClass": "entity-row entity-gap-3",
    "fieldClass": "field-container"
  },
  "sections": [
    {
      "id": "header",
      "title": "Invoice Information",
      "columns": 12,
      "styles": {
        "containerClass": "entity-section entity-card",
        "titleClass": "entity-section-title"
      },
      "rows": [
        {
          "fields": [
            {
              "id": "invoiceNumber",
              "label": "Invoice Number",
              "dataKey": "invoiceNumber",
              "type": "text",
              "span": 3,
              "styles": {
                "valueClass": "entity-fs-5 entity-fw-bold entity-text-primary",
                "containerClass": "field-container"
              }
            },
            {
              "id": "status",
              "label": "Status",
              "dataKey": "status",
              "type": "badge",
              "span": 3,
              "badgeMap": {
                "paid": {
                  "class": "field-badge badge-success",
                  "text": "Paid"
                },
                "pending": {
                  "class": "field-badge badge-warning",
                  "text": "Pending"
                },
                "overdue": {
                  "class": "field-badge badge-danger",
                  "text": "Overdue"
                },
                "draft": {
                  "class": "field-badge badge-secondary",
                  "text": "Draft"
                }
              }
            },
            {
              "id": "date",
              "label": "Invoice Date",
              "dataKey": "date",
              "type": "date",
              "span": 3
            },
            {
              "id": "dueDate",
              "label": "Due Date",
              "dataKey": "dueDate",
              "type": "date",
              "span": 3
            }
          ]
        }
      ]
    },
    {
      "id": "customer",
      "title": "Customer Details",
      "columns": 6,
      "styles": {
        "containerClass": "entity-section entity-card",
        "titleClass": "entity-section-title"
      },
      "rows": [
        {
          "fields": [
            {
              "id": "customerName",
              "label": "Customer Name",
              "dataKey": "customer.name",
              "type": "text",
              "span": 12,
              "styles": {
                "valueClass": "entity-fs-5 entity-fw-bold",
                "containerClass": "field-container entity-mb-3"
              }
            }
          ]
        },
        {
          "fields": [
            {
              "id": "customerEmail",
              "label": "Email",
              "dataKey": "customer.email",
              "type": "email",
              "span": 6
            },
            {
              "id": "customerPhone",
              "label": "Phone",
              "dataKey": "customer.phone",
              "type": "phone",
              "span": 6
            }
          ]
        },
        {
          "fields": [
            {
              "id": "customerTaxId",
              "label": "Tax ID",
              "dataKey": "customer.taxId",
              "type": "text",
              "span": 12
            }
          ]
        }
      ]
    },
    {
      "id": "financial",
      "title": "Financial Summary",
      "columns": 6,
      "styles": {
        "containerClass": "entity-section entity-card entity-bg-light",
        "titleClass": "entity-section-title"
      },
      "rows": [
        {
          "fields": [
            {
              "id": "subtotal",
              "label": "Subtotal",
              "dataKey": "subtotal",
              "type": "currency",
              "span": 12,
              "styles": {
                "containerClass": "field-container entity-border-bottom entity-pb-2"
              }
            }
          ]
        },
        {
          "fields": [
            {
              "id": "tax",
              "label": "Tax",
              "dataKey": "taxAmount",
              "type": "currency",
              "span": 6,
              "styles": {
                "containerClass": "field-container entity-border-bottom entity-pb-2"
              }
            },
            {
              "id": "taxRate",
              "label": "Tax Rate",
              "dataKey": "taxRate",
              "type": "percentage",
              "span": 6,
              "styles": {
                "containerClass": "field-container entity-border-bottom entity-pb-2"
              }
            }
          ]
        },
        {
          "fields": [
            {
              "id": "total",
              "label": "Total Amount",
              "dataKey": "total",
              "type": "currency",
              "span": 12,
              "styles": {
                "valueClass": "entity-fs-4 entity-fw-bold entity-text-success",
                "containerClass": "field-container entity-pt-2"
              }
            }
          ]
        }
      ]
    },
    {
      "id": "items",
      "title": "Invoice Items",
      "columns": 12,
      "styles": {
        "containerClass": "entity-section entity-card",
        "titleClass": "entity-section-title"
      },
      "rows": [
        {
          "fields": [
            {
              "id": "itemsTable",
              "label": "",
              "dataKey": "items",
              "type": "array",
              "span": 12,
              "styles": {
                "containerClass": "entity-table-responsive",
                "valueClass": ""
              }
            }
          ]
        }
      ]
    },
    {
      "id": "payment",
      "title": "Payment Details",
      "columns": 12,
      "styles": {
        "containerClass": "entity-section entity-card",
        "titleClass": "entity-section-title"
      },
      "rows": [
        {
          "fields": [
            {
              "id": "paymentMethod",
              "label": "Payment Method",
              "dataKey": "paymentMethod",
              "type": "text",
              "span": 4
            },
            {
              "id": "paymentDate",
              "label": "Payment Date",
              "dataKey": "paymentDate",
              "type": "date",
              "span": 4
            },
            {
              "id": "terms",
              "label": "Payment Terms",
              "dataKey": "terms",
              "type": "text",
              "span": 4
            }
          ]
        },
        {
          "fields": [
            {
              "id": "notes",
              "label": "Notes",
              "dataKey": "notes",
              "type": "textarea",
              "span": 12,
              "styles": {
                "containerClass": "field-container entity-bg-light entity-p-3 entity-rounded",
                "valueClass": "entity-fst-italic"
              }
            }
          ]
        }
      ]
    }
  ]
}