{
  "page_ir": {
    "page_id": "branch_management",
    "page_goal": "Allow administrators to manage library branches including creating, editing, deactivating branches, viewing assigned librarians, and reassigning them.",
    "style": {
      "tone": "professional",
      "theme": "light",
      "density": "comfortable",
      "color_intent": "neutral with primary accents"
    },
    "accessibility": {
      "required_labels": [
        "Branch Name",
        "Address",
        "Phone",
        "Email",
        "Operating Hours",
        "Status",
        "Add Branch",
        "Edit",
        "Deactivate"
      ],
      "skip_navigation": true,
      "focus_management": true,
      "announce_changes": []
    },
    "responsive": {
      "breakpoints": {
        "sm": 576,
        "md": 768,
        "lg": 1024,
        "xl": 1200
      },
      "collapse_rules": [
        "table scrolls horizontally on small screens",
        "modal becomes full-width on mobile"
      ],
      "hidden_on_small": [
        "operating_hours_column"
      ],
      "stack_on_small": []
    },
    "constraints": [
      "Only administrators can access this page",
      "Branch cannot be deleted if it has active loans"
    ],
    "seo_title": null,
    "seo_description": null
  },
  "data_ir": {
    "types": {},
    "state": {
      "branches": {
        "type": "array",
        "initial": [],
        "required": true,
        "constraints": {},
        "item_type": null
      },
      "librarians": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "branchModalVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "editingBranch": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "expandedRowKeys": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "searchText": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "loading": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "submitting": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      }
    },
    "derived": {
      "filteredBranches": {
        "type": "array",
        "expr": "state.branches.filter(b => !state.searchText || b.name.toLowerCase().includes(state.searchText.toLowerCase()) || b.address.toLowerCase().includes(state.searchText.toLowerCase()))",
        "deps": []
      }
    }
  },
  "data_fetch_ir": {
    "endpoints": {
      "9b3044ced8b341049a14ccab25ac37a1": {
        "endpoint_id": "9b3044ced8b341049a14ccab25ac37a1",
        "module": "Library Branches",
        "endpoint": "/library-branches/",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "limit": 100,
          "offset": 0,
          "search": "$state.searchText"
        },
        "body": null,
        "fields": [
          "id",
          "name",
          "address",
          "phone",
          "email",
          "operating_hours",
          "created_at",
          "updated_at"
        ],
        "response_target": "branches",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "d90f0903817a4e3ea34c914677c5ca65": {
        "endpoint_id": "d90f0903817a4e3ea34c914677c5ca65",
        "module": "Authentication",
        "endpoint": "/auth/librarians",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "limit": 100,
          "offset": 0
        },
        "body": null,
        "fields": [
          "id",
          "user_id",
          "employee_id",
          "hire_date",
          "library_branch_id",
          "created_at",
          "updated_at"
        ],
        "response_target": "librarians",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "af55ceec3ef14f2d8eaec72ef57272c1": {
        "endpoint_id": "af55ceec3ef14f2d8eaec72ef57272c1",
        "module": "Library Branches",
        "endpoint": "/library-branches/",
        "method": "POST",
        "path_params": {},
        "query_params": {},
        "body": {},
        "fields": [
          "id",
          "name",
          "address",
          "phone",
          "email",
          "operating_hours",
          "created_at",
          "updated_at"
        ],
        "response_target": "branches",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "7960823a121d43138f159748ef774260": {
        "endpoint_id": "7960823a121d43138f159748ef774260",
        "module": "Library Branches",
        "endpoint": "/library-branches/{branch_id}",
        "method": "PATCH",
        "path_params": {
          "branch_id": "$state.editingBranch.id"
        },
        "query_params": {},
        "body": {},
        "fields": [
          "id",
          "name",
          "address",
          "phone",
          "email",
          "operating_hours",
          "created_at",
          "updated_at"
        ],
        "response_target": "branches",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "7dda3131045a443c86e4c768f1891274": {
        "endpoint_id": "7dda3131045a443c86e4c768f1891274",
        "module": "Library Branches",
        "endpoint": "/library-branches/{branch_id}",
        "method": "DELETE",
        "path_params": {
          "branch_id": "$state.editingBranch.id"
        },
        "query_params": {},
        "body": null,
        "fields": [],
        "response_target": "branches",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "9d61ece191314aafb61c31e7df3fe99e": {
        "endpoint_id": "9d61ece191314aafb61c31e7df3fe99e",
        "module": "Authentication",
        "endpoint": "/auth/librarians/{librarian_id}",
        "method": "PUT",
        "path_params": {
          "librarian_id": "$selectedLibrarianId"
        },
        "query_params": {},
        "body": {},
        "fields": [
          "id",
          "user_id",
          "employee_id",
          "hire_date",
          "library_branch_id"
        ],
        "response_target": "librarians",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      }
    }
  },
  "data_model_ir": {
    "entities": {
      "branch": {
        "name": "LibraryBranch",
        "backend_module": "Library Branches",
        "fields": [
          "id",
          "name",
          "address",
          "phone",
          "email",
          "operating_hours",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "name",
          "address",
          "phone",
          "email",
          "operating_hours"
        ],
        "search_fields": [
          "name",
          "address"
        ],
        "filters": [
          "name",
          "address"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "librarian": {
        "name": "Librarian",
        "backend_module": "Authentication",
        "fields": [
          "id",
          "user_id",
          "employee_id",
          "hire_date",
          "library_branch_id",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "employee_id",
          "hire_date",
          "library_branch_id"
        ],
        "search_fields": [],
        "filters": [
          "library_branch_id"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      }
    },
    "relationships": []
  },
  "behaviour_ir": {
    "events": {
      "onSearchChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.searchText",
            "expr": "event.target.value"
          }
        ],
        "description": ""
      },
      "onExpandRow": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.expandedRowKeys",
            "expr": "expandedKeys"
          }
        ],
        "description": ""
      }
    },
    "actions": {
      "04ff5dfcb77b46dc8c968bdee5239de1": {
        "action_id": "04ff5dfcb77b46dc8c968bdee5239de1",
        "trigger": "button_click",
        "target_component_id": "add_branch_button",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.branchModalVisible",
            "expr": "true"
          },
          {
            "target": "state.editingBranch",
            "expr": "null"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "e5a4e014efa84ad08b3500e309cbe5e1": {
        "action_id": "e5a4e014efa84ad08b3500e309cbe5e1",
        "trigger": "button_click",
        "target_component_id": "edit_branch_button",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.branchModalVisible",
            "expr": "true"
          },
          {
            "target": "state.editingBranch",
            "expr": "record"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "510c0fcdcb874473ad0a465fde393e3c": {
        "action_id": "510c0fcdcb874473ad0a465fde393e3c",
        "trigger": "button_click",
        "target_component_id": "branch_modal",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.branchModalVisible",
            "expr": "false"
          },
          {
            "target": "state.editingBranch",
            "expr": "null"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "0a3dd974bdec4d39abcb914b32f879b3": {
        "action_id": "0a3dd974bdec4d39abcb914b32f879b3",
        "trigger": "form_submit",
        "target_component_id": "branch_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\": \"name\", \"message\": \"Branch name is required\", \"rule_id\": \"val_name\", \"type\": \"required\"}",
            "message": "{\"field\": \"name\", \"message\": \"Branch name is required\", \"rule_id\": \"val_name\", \"type\": \"required\"}"
          },
          {
            "rule_id": "val_1",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"address\", \"message\": \"Address is required\", \"rule_id\": \"val_address\", \"type\": \"required\"}",
            "message": "{\"field\": \"address\", \"message\": \"Address is required\", \"rule_id\": \"val_address\", \"type\": \"required\"}"
          },
          {
            "rule_id": "val_2",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"email\", \"message\": \"Please enter a valid email\", \"rule_id\": \"val_email\", \"type\": \"email\"}",
            "message": "{\"field\": \"email\", \"message\": \"Please enter a valid email\", \"rule_id\": \"val_email\", \"type\": \"email\"}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.submitting",
            "expr": "true"
          }
        ],
        "api_endpoint": "af55ceec3ef14f2d8eaec72ef57272c1",
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Branch saved successfully!",
              "type": "success"
            }
          },
          {
            "type": "modal_close",
            "config": {
              "modal_id": "branch_modal"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchBranches"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "75c707bc69c54884a8a6e6a80e0edcc3": {
        "action_id": "75c707bc69c54884a8a6e6a80e0edcc3",
        "trigger": "form_submit",
        "target_component_id": "branch_form",
        "operation": "update",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [
          {
            "rule_id": "val_0",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"name\", \"message\": \"Branch name is required\", \"rule_id\": \"val_name\", \"type\": \"required\"}",
            "message": "{\"field\": \"name\", \"message\": \"Branch name is required\", \"rule_id\": \"val_name\", \"type\": \"required\"}"
          },
          {
            "rule_id": "val_1",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"address\", \"message\": \"Address is required\", \"rule_id\": \"val_address\", \"type\": \"required\"}",
            "message": "{\"field\": \"address\", \"message\": \"Address is required\", \"rule_id\": \"val_address\", \"type\": \"required\"}"
          },
          {
            "rule_id": "val_2",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"email\", \"message\": \"Please enter a valid email\", \"rule_id\": \"val_email\", \"type\": \"email\"}",
            "message": "{\"field\": \"email\", \"message\": \"Please enter a valid email\", \"rule_id\": \"val_email\", \"type\": \"email\"}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.submitting",
            "expr": "true"
          }
        ],
        "api_endpoint": "7960823a121d43138f159748ef774260",
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Branch updated successfully!",
              "type": "success"
            }
          },
          {
            "type": "modal_close",
            "config": {
              "modal_id": "branch_modal"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchBranches"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "c31c004ef05b4d8f8d7c8e1fdca8d2b9": {
        "action_id": "c31c004ef05b4d8f8d7c8e1fdca8d2b9",
        "trigger": "button_click",
        "target_component_id": "deactivate_branch_button",
        "operation": "delete",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": true,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.loading",
            "expr": "true"
          }
        ],
        "api_endpoint": "7dda3131045a443c86e4c768f1891274",
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Branch deactivated successfully!",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchBranches"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "9d61ece191314aafb61c31e7df3fe99e": {
        "action_id": "9d61ece191314aafb61c31e7df3fe99e",
        "trigger": "button_click",
        "target_component_id": "reassign_librarian_button",
        "operation": "update",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": true,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [],
        "api_endpoint": "9d61ece191314aafb61c31e7df3fe99e",
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Librarian reassigned successfully!",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchLibrarians"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "555fdbf881c54500bbb10a81c8cad587": {
        "action_id": "555fdbf881c54500bbb10a81c8cad587",
        "trigger": "button_click",
        "target_component_id": "back_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": "navigate",
            "config": {
              "path": "/admin/dashboard"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      }
    },
    "feedback": {
      "0a3dd974bdec4d39abcb914b32f879b3": {
        "action_id": "0a3dd974bdec4d39abcb914b32f879b3",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Branch saved successfully!",
        "error_message": "Failed to save branch. Please try again.",
        "ui_updates": []
      },
      "75c707bc69c54884a8a6e6a80e0edcc3": {
        "action_id": "75c707bc69c54884a8a6e6a80e0edcc3",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Branch updated successfully!",
        "error_message": "Failed to update branch. Please try again.",
        "ui_updates": []
      },
      "c31c004ef05b4d8f8d7c8e1fdca8d2b9": {
        "action_id": "c31c004ef05b4d8f8d7c8e1fdca8d2b9",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Branch deactivated successfully!",
        "error_message": "Failed to deactivate branch.",
        "ui_updates": []
      },
      "9d61ece191314aafb61c31e7df3fe99e": {
        "action_id": "9d61ece191314aafb61c31e7df3fe99e",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Librarian reassigned successfully!",
        "error_message": "Failed to reassign librarian.",
        "ui_updates": []
      }
    }
  },
  "component_ir": {
    "library": "antd",
    "theme": {
      "primaryColor": "#1677ff",
      "secondaryColor": "#000000",
      "successColor": null,
      "warningColor": null,
      "errorColor": null,
      "fontFamily": "sans-serif",
      "fontSize": null,
      "borderRadius": 6
    },
    "components": {
      "main_container": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "minHeight": "100vh",
          "width": "100%",
          "padding": "24px",
          "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",
          "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
      },
      "header_left": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "display": "flex",
          "alignItems": "center",
          "gap": "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
      },
      "back_button": {
        "type": "Button",
        "label": "Back",
        "description": null,
        "bind": null,
        "onClick": "navigateToAdmin",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "icon": "ArrowLeftOutlined",
          "type": "text"
        },
        "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
      },
      "page_title": {
        "type": "Typography.Title",
        "label": "Branch Management",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "level": 3
        },
        "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
      },
      "header_actions": {
        "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",
          "alignItems": "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
      },
      "search_input": {
        "type": "Input.Search",
        "label": "Search branches",
        "description": null,
        "bind": "state.searchText",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Search by name or address...",
          "allowClear": true
        },
        "dynamic_props": {},
        "styles": {
          "width": "280px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "add_branch_button": {
        "type": "Button",
        "label": "Add Branch",
        "description": null,
        "bind": null,
        "onClick": "openAddBranchModal",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "icon": "PlusOutlined"
        },
        "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
      },
      "branches_table": {
        "type": "Table",
        "label": null,
        "description": null,
        "bind": "state.branches",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "columns": [
            {
              "title": "Branch Name",
              "dataIndex": "name",
              "key": "name",
              "sorter": true
            },
            {
              "title": "Address",
              "dataIndex": "address",
              "key": "address"
            },
            {
              "title": "Phone",
              "dataIndex": "phone",
              "key": "phone"
            },
            {
              "title": "Email",
              "dataIndex": "email",
              "key": "email"
            },
            {
              "title": "Operating Hours",
              "dataIndex": "operating_hours",
              "key": "operating_hours"
            },
            {
              "title": "Actions",
              "key": "actions",
              "render": "actions"
            }
          ],
          "rowKey": "id",
          "expandable": true,
          "pagination": {
            "pageSize": 10
          },
          "loading": "state.loading"
        },
        "dynamic_props": {},
        "styles": {
          "background": "#fff",
          "borderRadius": "6px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "edit_branch_button": {
        "type": "Button",
        "label": "Edit",
        "description": null,
        "bind": null,
        "onClick": "openEditBranchModal",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "link",
          "icon": "EditOutlined",
          "size": "small"
        },
        "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
      },
      "deactivate_branch_button": {
        "type": "Button",
        "label": "Deactivate",
        "description": null,
        "bind": null,
        "onClick": "deactivateBranch",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "link",
          "danger": true,
          "icon": "StopOutlined",
          "size": "small"
        },
        "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
      },
      "expanded_librarians_section": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "padding": "16px",
          "background": "#fafafa",
          "borderRadius": "4px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "librarians_title": {
        "type": "Typography.Text",
        "label": "Assigned Librarians",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "strong": true
        },
        "dynamic_props": {},
        "styles": {
          "marginBottom": "12px",
          "display": "block"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "librarians_list": {
        "type": "Table",
        "label": null,
        "description": null,
        "bind": "state.librarians",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "columns": [
            {
              "title": "Employee ID",
              "dataIndex": "employee_id",
              "key": "employee_id"
            },
            {
              "title": "Hire Date",
              "dataIndex": "hire_date",
              "key": "hire_date"
            },
            {
              "title": "Actions",
              "key": "actions",
              "render": "reassign_actions"
            }
          ],
          "rowKey": "id",
          "size": "small",
          "pagination": false
        },
        "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
      },
      "reassign_librarian_button": {
        "type": "Button",
        "label": "Reassign",
        "description": null,
        "bind": null,
        "onClick": "reassignLibrarian",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "link",
          "size": "small"
        },
        "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
      },
      "branch_modal": {
        "type": "Modal",
        "label": null,
        "description": null,
        "bind": "state.branchModalVisible",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "state.editingBranch ? 'Edit Branch' : 'Add Branch'",
          "width": 640,
          "destroyOnClose": true,
          "okText": "Save",
          "cancelText": "Cancel"
        },
        "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
      },
      "branch_form": {
        "type": "Form",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "layout": "vertical",
          "initialValues": "state.editingBranch"
        },
        "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_name_field": {
        "type": "Form.Item",
        "label": "Branch Name",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "name",
          "rules": [
            {
              "required": true,
              "message": "Branch 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_name_input": {
        "type": "Input",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Enter branch name"
        },
        "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_address_field": {
        "type": "Form.Item",
        "label": "Address",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "address",
          "rules": [
            {
              "required": true,
              "message": "Address 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_address_input": {
        "type": "Input.TextArea",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Street, City, State, ZIP",
          "rows": 3
        },
        "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_phone_field": {
        "type": "Form.Item",
        "label": "Phone",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "phone"
        },
        "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_phone_input": {
        "type": "Input",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Enter phone number"
        },
        "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_email_field": {
        "type": "Form.Item",
        "label": "Email",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "email",
          "rules": [
            {
              "type": "email",
              "message": "Please enter a valid email"
            }
          ]
        },
        "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_email_input": {
        "type": "Input",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Enter email address"
        },
        "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_operating_hours_field": {
        "type": "Form.Item",
        "label": "Operating Hours",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "operating_hours"
        },
        "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_operating_hours_input": {
        "type": "Input.TextArea",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "e.g., Mon-Fri: 9AM-8PM, Sat: 10AM-6PM, Sun: Closed",
          "rows": 4
        },
        "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": [
        "page_header",
        "branches_table",
        "branch_modal"
      ],
      "page_header": [
        "header_left",
        "header_actions"
      ],
      "header_left": [
        "back_button",
        "page_title"
      ],
      "header_actions": [
        "search_input",
        "add_branch_button"
      ],
      "expanded_librarians_section": [
        "librarians_title",
        "librarians_list"
      ],
      "branch_modal": [
        "branch_form"
      ],
      "branch_form": [
        "form_name_field",
        "form_address_field",
        "form_phone_field",
        "form_email_field",
        "form_operating_hours_field"
      ],
      "form_name_field": [
        "form_name_input"
      ],
      "form_address_field": [
        "form_address_input"
      ],
      "form_phone_field": [
        "form_phone_input"
      ],
      "form_email_field": [
        "form_email_input"
      ],
      "form_operating_hours_field": [
        "form_operating_hours_input"
      ]
    },
    "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
      },
      "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
      },
      "header_left": {
        "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
      },
      "header_actions": {
        "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
      },
      "expanded_librarians_section": {
        "type": "vertical",
        "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
      },
      "branch_form": {
        "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
      },
      "branch_modal": {
        "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
      },
      "form_name_field": {
        "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
      },
      "form_address_field": {
        "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
      },
      "form_phone_field": {
        "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
      },
      "form_email_field": {
        "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
      },
      "form_operating_hours_field": {
        "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
      }
    },
    "layout_zones": [
      {
        "zone_id": "main_content",
        "component": "main_container",
        "anchor": "top-left",
        "size_hint": "full-width",
        "z_layer": "base",
        "notes": "Main page container"
      },
      {
        "zone_id": "modal_overlay",
        "component": "branch_modal",
        "anchor": "center",
        "size_hint": "640px",
        "z_layer": "overlay",
        "notes": "Branch add/edit modal"
      }
    ],
    "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
}
