{
  "title": "Policies",
  "header": [
    {
      "type": "html",
      "html": "<h3 class=\"text-lg font-bold\">Policies Management</h3>"
    }
  ],
  "body": [
    {
      "type": "table",
      "options": {
        "tableName": "policies",
        "showGlobalSearch": true,
        "editFormId": 1,
        "syncManager": {},
        "rowActions": [
          {
            "label": "Edit",
            "formId": 1
          },
          {
            "label": "Delete",
            "action": "delete"
          }
        ]
      }
    },
    {
      "type": "form",
      "formId": 1,
      "options": {
        "submitText": "Save Policy"
      },
      "elements": [
        {
          "label": "Title",
          "field_name": "title",
          "data_column": "title",
          "type_id": 1,
          "order_index": 1,
          "required": true
        },
        {
          "label": "Content",
          "field_name": "content",
          "data_column": "content",
          "type_id": 7,
          "order_index": 2
        },
        {
          "label": "Content Type",
          "field_name": "content_type",
          "data_column": "content_type",
          "type_id": 9,
          "order_index": 3,
          "options_table": null,
          "options": ["html", "pdf"]
        },
        {
          "label": "Policy Type",
          "field_name": "policy_type",
          "data_column": "policy_type",
          "type_id": 1,
          "order_index": 4
        },
        {
          "label": "PDF URL",
          "field_name": "pdf_url",
          "data_column": "pdf_url",
          "type_id": 1,
          "order_index": 5
        },
        {
          "label": "Language Code",
          "field_name": "language_code",
          "data_column": "language_code",
          "type_id": 1,
          "order_index": 6,
          "default": "en"
        },
        {
          "label": "Expiry Date",
          "field_name": "expiry_date",
          "data_column": "expiry_date",
          "type_id": 4,
          "order_index": 7
        },
        {
          "label": "Renewal Status",
          "field_name": "renewal_status",
          "data_column": "renewal_status",
          "type_id": 1,
          "order_index": 8
        },
        {
          "label": "Visible to Roles",
          "field_name": "visible_to_roles",
          "data_column": "visible_to_roles",
          "type_id": 1,
          "order_index": 9
        },
        {
          "label": "Visible to Group",
          "field_name": "visible_to_group",
          "data_column": "visible_to_group",
          "type_id": 1,
          "order_index": 10
        },
        {
          "label": "Visible to All",
          "field_name": "visible_to_all",
          "data_column": "visible_to_all",
          "type_id": 3,
          "order_index": 11
        },
        {
          "label": "Version",
          "field_name": "version",
          "data_column": "version",
          "type_id": 2,
          "order_index": 12,
          "default": 1
        }
      ]
    }
  ],
  "footer": [
    {
      "type": "button",
      "label": "Close",
      "onClick": "closeModal"
    },
    {
      "type": "button",
      "label": "Submit",
      "api": {
        "url": "/api/policies",
        "method": "POST"
      }
    }
  ]
}