{
  "page_ir": {
    "page_id": "documents_list",
    "page_goal": "Document management page with grid/list toggle view, filtering, search, upload modal, detail drawer with preview and version history",
    "style": {
      "tone": "professional",
      "theme": "light",
      "density": "comfortable",
      "color_intent": "neutral with indigo accents"
    },
    "accessibility": {
      "required_labels": [
        "search_input",
        "type_filter",
        "production_filter",
        "venue_filter",
        "upload_button",
        "view_toggle"
      ],
      "skip_navigation": true,
      "focus_management": true,
      "announce_changes": []
    },
    "responsive": {
      "breakpoints": {
        "sm": 576,
        "md": 768,
        "lg": 1024,
        "xl": 1440
      },
      "collapse_rules": [
        "grid collapses to single column on small screens",
        "filters collapse to dropdown on mobile"
      ],
      "hidden_on_small": [
        "file_size_column"
      ],
      "stack_on_small": []
    },
    "constraints": [
      "Maximum file upload size 50MB",
      "Deleted documents move to trash with 30-day retention"
    ],
    "seo_title": null,
    "seo_description": null
  },
  "data_ir": {
    "types": {},
    "state": {
      "documents": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "productions": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "venues": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "searchText": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterType": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterProduction": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterVenue": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "viewMode": {
        "type": "string",
        "initial": "grid",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "uploadModalVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "detailDrawerVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "selectedDocumentId": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "selectedDocumentDetail": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "loading": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "deleteConfirmVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      }
    },
    "derived": {
      "filteredDocuments": {
        "type": "array",
        "expr": "state.documents.filter(d => (!state.searchText || d.title.toLowerCase().includes(state.searchText.toLowerCase())) && (!state.filterType || d.document_type === state.filterType) && (!state.filterProduction || d.production_id === state.filterProduction) && (!state.filterVenue || d.venue_id === state.filterVenue))",
        "deps": []
      }
    }
  },
  "data_fetch_ir": {
    "endpoints": {
      "a637b98a8ae646f6b4f771973c483bd9": {
        "endpoint_id": "a637b98a8ae646f6b4f771973c483bd9",
        "module": "Documents",
        "endpoint": "/documents/",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "limit": 100,
          "search": "$state.searchText",
          "document_type": "$state.filterType",
          "production_id": "$state.filterProduction",
          "venue_id": "$state.filterVenue"
        },
        "body": null,
        "fields": [
          "id",
          "production_id",
          "venue_id",
          "uploaded_by_user_id",
          "title",
          "description",
          "document_type",
          "file_url",
          "file_size_bytes",
          "mime_type",
          "created_at",
          "updated_at"
        ],
        "response_target": "documents",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "35b8b8f20b9d4bc58ef0eb0242dc20f4": {
        "endpoint_id": "35b8b8f20b9d4bc58ef0eb0242dc20f4",
        "module": "Documents",
        "endpoint": "/documents/{document_id}/details",
        "method": "GET",
        "path_params": {
          "document_id": "$state.selectedDocumentId"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "id",
          "production_id",
          "venue_id",
          "uploaded_by_user_id",
          "title",
          "description",
          "document_type",
          "file_url",
          "file_size_bytes",
          "mime_type",
          "created_at",
          "updated_at",
          "production",
          "venue",
          "uploaded_by_user"
        ],
        "response_target": "selectedDocumentDetail",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "c1711b6309b642078d9292288206e77e": {
        "endpoint_id": "c1711b6309b642078d9292288206e77e",
        "module": "Productions",
        "endpoint": "/productions/",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "limit": 100
        },
        "body": null,
        "fields": [
          "id",
          "title"
        ],
        "response_target": "productions",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "dbbcf6c43d424380b224f2b0a3717788": {
        "endpoint_id": "dbbcf6c43d424380b224f2b0a3717788",
        "module": "Venue Management",
        "endpoint": "/venues/",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "limit": 100
        },
        "body": null,
        "fields": [
          "id",
          "name"
        ],
        "response_target": "venues",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "8de94329c18046f9b3010954fc56ca3f": {
        "endpoint_id": "8de94329c18046f9b3010954fc56ca3f",
        "module": "Documents",
        "endpoint": "/documents/",
        "method": "POST",
        "path_params": {},
        "query_params": {},
        "body": {},
        "fields": [
          "id",
          "title",
          "document_type",
          "file_url",
          "created_at"
        ],
        "response_target": "createDocument_data",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "50502598778b40e287fefc84c67d9e61": {
        "endpoint_id": "50502598778b40e287fefc84c67d9e61",
        "module": "Documents",
        "endpoint": "/documents/{document_id}",
        "method": "DELETE",
        "path_params": {
          "document_id": "$state.selectedDocumentId"
        },
        "query_params": {},
        "body": null,
        "fields": [],
        "response_target": "50502598778b40e287fefc84c67d9e61_data",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      }
    }
  },
  "data_model_ir": {
    "entities": {
      "document": {
        "name": "Document",
        "backend_module": "Documents",
        "fields": [
          "id",
          "production_id",
          "venue_id",
          "uploaded_by_user_id",
          "title",
          "description",
          "document_type",
          "file_url",
          "file_size_bytes",
          "mime_type",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "title",
          "document_type",
          "created_at",
          "uploaded_by_user_id",
          "file_size_bytes"
        ],
        "search_fields": [
          "title"
        ],
        "filters": [
          "document_type",
          "production_id",
          "venue_id"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "production": {
        "name": "Production",
        "backend_module": "Productions",
        "fields": [
          "id",
          "title",
          "venue_id",
          "status"
        ],
        "computed": [],
        "display_fields": [
          "title"
        ],
        "search_fields": [],
        "filters": [],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "venue": {
        "name": "Venue",
        "backend_module": "Venue Management",
        "fields": [
          "id",
          "name",
          "city",
          "country"
        ],
        "computed": [],
        "display_fields": [
          "name"
        ],
        "search_fields": [],
        "filters": [],
        "default_sort": null,
        "default_sort_dir": "asc"
      }
    },
    "relationships": []
  },
  "behaviour_ir": {
    "events": {
      "onSearchChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.searchText",
            "expr": "event.target.value"
          }
        ],
        "description": ""
      },
      "onTypeFilterChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterType",
            "expr": "value"
          }
        ],
        "description": ""
      },
      "onProductionFilterChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterProduction",
            "expr": "value"
          }
        ],
        "description": ""
      },
      "onVenueFilterChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterVenue",
            "expr": "value"
          }
        ],
        "description": ""
      },
      "onViewModeChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.viewMode",
            "expr": "value"
          }
        ],
        "description": ""
      },
      "onDocumentSelect": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.selectedDocumentId",
            "expr": "documentId"
          },
          {
            "target": "state.detailDrawerVisible",
            "expr": "true"
          }
        ],
        "description": ""
      }
    },
    "actions": {
      "ce4a937250224d4da7c941b4f3158b56": {
        "action_id": "ce4a937250224d4da7c941b4f3158b56",
        "trigger": "button_click",
        "target_component_id": "upload_button",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.uploadModalVisible",
            "expr": "true"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "9ed62aee66ab4fafb26adce4fcafbdb4": {
        "action_id": "9ed62aee66ab4fafb26adce4fcafbdb4",
        "trigger": "button_click",
        "target_component_id": "upload_modal",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.uploadModalVisible",
            "expr": "false"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "75247b0f9ef944608d9ec57dbbd2b529": {
        "action_id": "75247b0f9ef944608d9ec57dbbd2b529",
        "trigger": "form_submit",
        "target_component_id": "upload_form",
        "operation": "create",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [
          {
            "rule_id": "val_0",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"title\", \"message\": \"Document title is required\", \"rule_id\": \"val_title\", \"type\": \"required\"}",
            "message": "{\"field\": \"title\", \"message\": \"Document title is required\", \"rule_id\": \"val_title\", \"type\": \"required\"}"
          },
          {
            "rule_id": "val_1",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"file_url\", \"message\": \"File is required\", \"rule_id\": \"val_file\", \"type\": \"required\"}",
            "message": "{\"field\": \"file_url\", \"message\": \"File is required\", \"rule_id\": \"val_file\", \"type\": \"required\"}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.uploadModalVisible",
            "expr": "false"
          }
        ],
        "api_endpoint": "8de94329c18046f9b3010954fc56ca3f",
        "api_body": "{title: formValues.title, description: formValues.description, document_type: formValues.document_type, file_url: formValues.file_url, production_id: formValues.production_id, venue_id: formValues.venue_id, uploaded_by_user_id: appContext.currentUser.id}",
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Document uploaded successfully",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchDocuments"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "7b5ae523f37f4821a859a342c325d26f": {
        "action_id": "7b5ae523f37f4821a859a342c325d26f",
        "trigger": "row_click",
        "target_component_id": "document_grid",
        "operation": "read",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.selectedDocumentId",
            "expr": "record.id"
          },
          {
            "target": "state.detailDrawerVisible",
            "expr": "true"
          }
        ],
        "api_endpoint": "35b8b8f20b9d4bc58ef0eb0242dc20f4",
        "api_body": null,
        "side_effects": [
          {
            "type": "api_call",
            "config": {
              "endpoint_id": "fetchDocumentDetail"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "9ef6434b924f473194a3beaed4afb2db": {
        "action_id": "9ef6434b924f473194a3beaed4afb2db",
        "trigger": "button_click",
        "target_component_id": "detail_drawer",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.detailDrawerVisible",
            "expr": "false"
          },
          {
            "target": "state.selectedDocumentDetail",
            "expr": "null"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "50502598778b40e287fefc84c67d9e61": {
        "action_id": "50502598778b40e287fefc84c67d9e61",
        "trigger": "button_click",
        "target_component_id": "delete_button",
        "operation": "delete",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": true,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.detailDrawerVisible",
            "expr": "false"
          },
          {
            "target": "state.deleteConfirmVisible",
            "expr": "false"
          }
        ],
        "api_endpoint": "50502598778b40e287fefc84c67d9e61",
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Document moved to trash",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchDocuments"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "70b4f10e8fc442a8aa3fbcbff2b7a5a4": {
        "action_id": "70b4f10e8fc442a8aa3fbcbff2b7a5a4",
        "trigger": "button_click",
        "target_component_id": "download_button",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "download",
            "config": {
              "url": "state.selectedDocumentDetail.file_url",
              "filename": "state.selectedDocumentDetail.title"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      }
    },
    "feedback": {
      "75247b0f9ef944608d9ec57dbbd2b529": {
        "action_id": "75247b0f9ef944608d9ec57dbbd2b529",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Document uploaded successfully",
        "error_message": "Failed to upload document",
        "ui_updates": []
      },
      "50502598778b40e287fefc84c67d9e61": {
        "action_id": "50502598778b40e287fefc84c67d9e61",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Document moved to trash",
        "error_message": "Failed to delete document",
        "ui_updates": []
      },
      "7b5ae523f37f4821a859a342c325d26f": {
        "action_id": "7b5ae523f37f4821a859a342c325d26f",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "",
        "error_message": "Failed to load document details",
        "ui_updates": []
      }
    }
  },
  "component_ir": {
    "library": "antd",
    "theme": {
      "primaryColor": "#6366f1",
      "secondaryColor": "#4f46e5",
      "successColor": null,
      "warningColor": null,
      "errorColor": null,
      "fontFamily": "sans-serif",
      "fontSize": null,
      "borderRadius": 8
    },
    "components": {
      "main_container": {
        "type": "Layout",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "minHeight": "100vh",
          "width": "100%",
          "background": "#f5f5f5"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "page_header": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "display": "flex",
          "justifyContent": "space-between",
          "alignItems": "center",
          "padding": "24px 0"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "page_title": {
        "type": "Typography.Title",
        "label": "Documents",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "level": 2
        },
        "dynamic_props": {},
        "styles": {
          "margin": 0
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "upload_button": {
        "type": "Button",
        "label": "Upload Document",
        "description": null,
        "bind": null,
        "onClick": "openUploadModal",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "icon": "UploadOutlined",
          "size": "large"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "toolbar_section": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "display": "flex",
          "gap": "12px",
          "flexWrap": "wrap",
          "alignItems": "center",
          "marginBottom": "24px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "search_input": {
        "type": "Input.Search",
        "label": "Search documents",
        "description": null,
        "bind": "state.searchText",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Search by filename...",
          "allowClear": true,
          "style": {
            "width": 280
          }
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "type_filter": {
        "type": "Select",
        "label": "Document Type",
        "description": null,
        "bind": "state.filterType",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "All Types",
          "allowClear": true,
          "style": {
            "width": 160
          },
          "options": [
            {
              "label": "Script",
              "value": "SCRIPT"
            },
            {
              "label": "Contract",
              "value": "CONTRACT"
            },
            {
              "label": "Rider",
              "value": "RIDER"
            },
            {
              "label": "Schedule",
              "value": "SCHEDULE"
            },
            {
              "label": "Budget",
              "value": "BUDGET"
            },
            {
              "label": "Other",
              "value": "OTHER"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "production_filter": {
        "type": "Select",
        "label": "Production",
        "description": null,
        "bind": "state.filterProduction",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "All Productions",
          "allowClear": true,
          "style": {
            "width": 200
          },
          "options": "state.productions.map(p => ({label: p.title, value: p.id}))"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "venue_filter": {
        "type": "Select",
        "label": "Venue",
        "description": null,
        "bind": "state.filterVenue",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "All Venues",
          "allowClear": true,
          "style": {
            "width": 180
          },
          "options": "state.venues.map(v => ({label: v.name, value: v.id}))"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "view_toggle": {
        "type": "Radio.Group",
        "label": "View Mode",
        "description": null,
        "bind": "state.viewMode",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "optionType": "button",
          "buttonStyle": "solid",
          "options": [
            {
              "label": "Grid",
              "value": "grid"
            },
            {
              "label": "List",
              "value": "list"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {
          "marginLeft": "auto"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "document_grid": {
        "type": "List",
        "label": null,
        "description": null,
        "bind": "derived.filteredDocuments",
        "onClick": "openDocumentDetail",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "grid": {
            "gutter": 16,
            "xs": 1,
            "sm": 2,
            "md": 3,
            "lg": 4
          },
          "renderItem": "document_card",
          "loading": "state.loading"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "document_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": "openDocumentDetail",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "hoverable": true,
          "size": "small"
        },
        "dynamic_props": {},
        "styles": {
          "borderRadius": "8px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "card_icon": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "fontSize": "32px",
          "textAlign": "center",
          "padding": "16px 0",
          "color": "#6366f1"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "card_title": {
        "type": "Typography.Text",
        "label": null,
        "description": null,
        "bind": "item.title",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "strong": true,
          "ellipsis": true
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "card_meta": {
        "type": "Typography.Text",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "secondary"
        },
        "dynamic_props": {},
        "styles": {
          "fontSize": "12px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "document_table": {
        "type": "Table",
        "label": null,
        "description": null,
        "bind": "derived.filteredDocuments",
        "onClick": "openDocumentDetail",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "columns": [
            {
              "title": "Name",
              "dataIndex": "title",
              "key": "title",
              "ellipsis": true
            },
            {
              "title": "Type",
              "dataIndex": "document_type",
              "key": "document_type"
            },
            {
              "title": "Upload Date",
              "dataIndex": "created_at",
              "key": "created_at"
            },
            {
              "title": "Size",
              "dataIndex": "file_size_bytes",
              "key": "file_size_bytes"
            }
          ],
          "rowKey": "id",
          "pagination": {
            "pageSize": 20
          },
          "loading": "state.loading",
          "onRow": "record => ({onClick: () => openDocumentDetail(record)})"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "upload_modal": {
        "type": "Modal",
        "label": "Upload Document",
        "description": null,
        "bind": "state.uploadModalVisible",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Upload Document",
          "width": 640,
          "destroyOnClose": true,
          "footer": null
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "upload_form": {
        "type": "Form",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "layout": "vertical"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_file_upload": {
        "type": "Upload.Dragger",
        "label": "File",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "file",
          "multiple": false,
          "accept": ".pdf,.doc,.docx,.xls,.xlsx,.png,.jpg,.jpeg"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_title_input": {
        "type": "Form.Item",
        "label": "Name",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "title",
          "rules": [
            {
              "required": true,
              "message": "Document name is required"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_description_input": {
        "type": "Form.Item",
        "label": "Description",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "description"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_type_select": {
        "type": "Form.Item",
        "label": "Type",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "document_type",
          "options": [
            {
              "label": "Script",
              "value": "SCRIPT"
            },
            {
              "label": "Contract",
              "value": "CONTRACT"
            },
            {
              "label": "Rider",
              "value": "RIDER"
            },
            {
              "label": "Schedule",
              "value": "SCHEDULE"
            },
            {
              "label": "Budget",
              "value": "BUDGET"
            },
            {
              "label": "Other",
              "value": "OTHER"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_production_select": {
        "type": "Form.Item",
        "label": "Associated Production",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "production_id"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_venue_select": {
        "type": "Form.Item",
        "label": "Associated Venue",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "venue_id"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_submit_button": {
        "type": "Button",
        "label": "Upload",
        "description": null,
        "bind": null,
        "onClick": "submitDocument",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "htmlType": "submit",
          "block": true
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "detail_drawer": {
        "type": "Drawer",
        "label": "Document Details",
        "description": null,
        "bind": "state.detailDrawerVisible",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Document Details",
          "width": 560,
          "placement": "right",
          "destroyOnClose": true
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "detail_preview_section": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "background": "#fafafa",
          "borderRadius": "8px",
          "padding": "24px",
          "textAlign": "center",
          "marginBottom": "16px",
          "minHeight": "200px",
          "display": "flex",
          "alignItems": "center",
          "justifyContent": "center"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "detail_metadata": {
        "type": "Descriptions",
        "label": null,
        "description": null,
        "bind": "state.selectedDocumentDetail",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "column": 1,
          "size": "small",
          "bordered": true,
          "items": [
            {
              "label": "Title",
              "field": "title"
            },
            {
              "label": "Type",
              "field": "document_type"
            },
            {
              "label": "Description",
              "field": "description"
            },
            {
              "label": "File Size",
              "field": "file_size_bytes"
            },
            {
              "label": "Uploaded",
              "field": "created_at"
            },
            {
              "label": "Production",
              "field": "production.title"
            },
            {
              "label": "Venue",
              "field": "venue.name"
            },
            {
              "label": "Uploaded By",
              "field": "uploaded_by_user.first_name"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {
          "marginBottom": "16px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "detail_actions": {
        "type": "Space",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "direction": "vertical",
          "style": {
            "width": "100%"
          }
        },
        "dynamic_props": {},
        "styles": {
          "marginTop": "16px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "download_button": {
        "type": "Button",
        "label": "Download",
        "description": null,
        "bind": null,
        "onClick": "downloadDocument",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "icon": "DownloadOutlined",
          "block": true
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "upload_new_version_button": {
        "type": "Button",
        "label": "Upload New Version",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "icon": "UploadOutlined",
          "block": true
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "delete_button": {
        "type": "Button",
        "label": "Move to Trash",
        "description": null,
        "bind": null,
        "onClick": "deleteDocument",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "danger": true,
          "icon": "DeleteOutlined",
          "block": true
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "version_history_section": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "marginTop": "24px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "version_history_title": {
        "type": "Typography.Title",
        "label": "Version History",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "level": 5
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "version_history_list": {
        "type": "Timeline",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "items": [
            {
              "children": "Current version uploaded"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "content_wrapper": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "padding": "0 24px",
          "maxWidth": "1400px",
          "margin": "0 auto",
          "width": "100%"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "empty_state": {
        "type": "Empty",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "description": "No documents found"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      }
    }
  },
  "layout_ir": {
    "root": "main_container",
    "children": {
      "main_container": [
        "content_wrapper"
      ],
      "content_wrapper": [
        "page_header",
        "toolbar_section",
        "document_grid",
        "upload_modal",
        "detail_drawer"
      ],
      "page_header": [
        "page_title",
        "upload_button"
      ],
      "toolbar_section": [
        "search_input",
        "type_filter",
        "production_filter",
        "venue_filter",
        "view_toggle"
      ],
      "upload_modal": [
        "upload_form"
      ],
      "upload_form": [
        "form_file_upload",
        "form_title_input",
        "form_description_input",
        "form_type_select",
        "form_production_select",
        "form_venue_select",
        "form_submit_button"
      ],
      "detail_drawer": [
        "detail_preview_section",
        "detail_metadata",
        "detail_actions",
        "version_history_section"
      ],
      "detail_actions": [
        "download_button",
        "upload_new_version_button",
        "delete_button"
      ],
      "version_history_section": [
        "version_history_title",
        "version_history_list"
      ]
    },
    "layout": {
      "main_container": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "content_wrapper": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "page_header": {
        "type": "horizontal",
        "gap": 16,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "toolbar_section": {
        "type": "horizontal",
        "gap": 12,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "upload_form": {
        "type": "vertical",
        "gap": 16,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "detail_drawer": {
        "type": "vertical",
        "gap": 16,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "detail_actions": {
        "type": "vertical",
        "gap": 8,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "version_history_section": {
        "type": "vertical",
        "gap": 8,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      }
    },
    "layout_zones": [
      {
        "zone_id": "main_content",
        "component": "content_wrapper",
        "anchor": "center",
        "size_hint": "full-width",
        "z_layer": "base",
        "notes": "Main content area with max-width constraint"
      },
      {
        "zone_id": "upload_overlay",
        "component": "upload_modal",
        "anchor": "center",
        "size_hint": "auto",
        "z_layer": "overlay",
        "notes": "Upload document modal overlay"
      },
      {
        "zone_id": "detail_overlay",
        "component": "detail_drawer",
        "anchor": "center",
        "size_hint": "auto",
        "z_layer": "overlay",
        "notes": "Document detail drawer from right"
      }
    ],
    "responsive_overrides": []
  },
  "navigation_ir": {
    "tabs": [],
    "modals": {},
    "drawers": {},
    "routes": [],
    "breadcrumb": null,
    "default_tab": null
  },
  "realtime_ir": {
    "timers": {},
    "polling": {}
  },
  "metadata": {
    "ir_version": "3.5",
    "generated_at": "",
    "source_prompt": null,
    "schema_session_id": null,
    "warnings": []
  },
  "page_data_contract": null,
  "schema_ir": null
}
