{
  "page_ir": {
    "page_id": "circulation_manage",
    "page_goal": "Circulation management page for librarians to manage active loans, overdue books, and returns with checkout/return/renew operations and bulk overdue notifications",
    "style": {
      "tone": "professional",
      "theme": "light",
      "density": "comfortable",
      "color_intent": "neutral with status-based color coding for overdue items"
    },
    "accessibility": {
      "required_labels": [
        "search_input",
        "status_filter",
        "date_range_picker",
        "loans_table",
        "overdue_table",
        "returned_table"
      ],
      "skip_navigation": true,
      "focus_management": true,
      "announce_changes": []
    },
    "responsive": {
      "breakpoints": {
        "sm": 576,
        "md": 768,
        "lg": 1024,
        "xl": 1200
      },
      "collapse_rules": [
        "table columns collapse on small screens",
        "filters stack vertically on mobile"
      ],
      "hidden_on_small": [
        "bulk_actions_bar"
      ],
      "stack_on_small": []
    },
    "constraints": [
      "Role restricted to librarian and administrator",
      "Branch context from shared state filters results"
    ],
    "seo_title": null,
    "seo_description": null
  },
  "data_ir": {
    "types": {},
    "state": {
      "activeLoans": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "overdueLoans": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "returnedTodayLoans": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "activeTab": {
        "type": "string",
        "initial": "active",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "searchText": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "dateRange": {
        "type": "array",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "loading": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "selectedOverdueIds": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "returnModalVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "renewModalVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "selectedLoanId": {
        "type": "string",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      }
    },
    "derived": {
      "filteredActiveLoans": {
        "type": "array",
        "expr": "state.activeLoans.filter(l => (!state.searchText || l.book_title?.toLowerCase().includes(state.searchText.toLowerCase()) || l.member_name?.toLowerCase().includes(state.searchText.toLowerCase())))",
        "deps": []
      },
      "filteredOverdueLoans": {
        "type": "array",
        "expr": "state.overdueLoans.filter(l => (!state.searchText || l.book_title?.toLowerCase().includes(state.searchText.toLowerCase()) || l.member_name?.toLowerCase().includes(state.searchText.toLowerCase())))",
        "deps": []
      },
      "selectedOverdueCount": {
        "type": "number",
        "expr": "state.selectedOverdueIds.length",
        "deps": []
      }
    }
  },
  "data_fetch_ir": {
    "endpoints": {
      "e164cfbece8f45ebbed808175b14930a": {
        "endpoint_id": "e164cfbece8f45ebbed808175b14930a",
        "module": "Circulation",
        "endpoint": "/loans/",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "status": "ACTIVE",
          "limit": 50
        },
        "body": null,
        "fields": [
          "id",
          "member_id",
          "book_copy_id",
          "checkout_date",
          "due_date",
          "renewal_count",
          "status",
          "notes"
        ],
        "response_target": "activeLoans",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "25961a31db5f43d890ea5c5be12af3c2": {
        "endpoint_id": "25961a31db5f43d890ea5c5be12af3c2",
        "module": "Circulation",
        "endpoint": "/loans/",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "status": "OVERDUE",
          "limit": 50
        },
        "body": null,
        "fields": [
          "id",
          "member_id",
          "book_copy_id",
          "checkout_date",
          "due_date",
          "renewal_count",
          "status",
          "notes"
        ],
        "response_target": "overdueLoans",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "47693389c6c445d19e09b7256739e6f8": {
        "endpoint_id": "47693389c6c445d19e09b7256739e6f8",
        "module": "Circulation",
        "endpoint": "/loans/",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "status": "RETURNED",
          "limit": 50
        },
        "body": null,
        "fields": [
          "id",
          "member_id",
          "book_copy_id",
          "checkout_date",
          "due_date",
          "return_date",
          "renewal_count",
          "status",
          "notes"
        ],
        "response_target": "returnedTodayLoans",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "88d4380c66dc46d39dc6487008fc7c1f": {
        "endpoint_id": "88d4380c66dc46d39dc6487008fc7c1f",
        "module": "Circulation",
        "endpoint": "/loans/{loan_id}/return",
        "method": "POST",
        "path_params": {
          "loan_id": "$state.selectedLoanId"
        },
        "query_params": {},
        "body": {
          "checked_in_by_librarian_id": "appContext.currentUser.id",
          "notes": null
        },
        "fields": [
          "id",
          "status",
          "return_date"
        ],
        "response_target": "88d4380c66dc46d39dc6487008fc7c1f_data",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "1e2fcdd211e14034802af76d674cb29b": {
        "endpoint_id": "1e2fcdd211e14034802af76d674cb29b",
        "module": "Circulation",
        "endpoint": "/loans/{loan_id}/renew",
        "method": "POST",
        "path_params": {
          "loan_id": "$state.selectedLoanId"
        },
        "query_params": {},
        "body": {
          "notes": null
        },
        "fields": [
          "id",
          "due_date",
          "renewal_count",
          "status"
        ],
        "response_target": "1e2fcdd211e14034802af76d674cb29b_data",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "58ff5a7789eb456f9a302f280d8fcd8a": {
        "endpoint_id": "58ff5a7789eb456f9a302f280d8fcd8a",
        "module": "Circulation",
        "endpoint": "/loans/{loan_id}/details",
        "method": "GET",
        "path_params": {
          "loan_id": "$state.selectedLoanId"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "id",
          "member",
          "book_copy",
          "checkout_date",
          "due_date",
          "return_date",
          "renewal_count",
          "status",
          "notes"
        ],
        "response_target": "getLoanDetails_data",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      }
    }
  },
  "data_model_ir": {
    "entities": {
      "loan": {
        "name": "Loan",
        "backend_module": "Circulation",
        "fields": [
          "id",
          "member_id",
          "book_copy_id",
          "checkout_date",
          "due_date",
          "return_date",
          "renewal_count",
          "status",
          "checked_out_by_librarian_id",
          "checked_in_by_librarian_id",
          "notes",
          "created_at",
          "updated_at"
        ],
        "computed": [
          "days_overdue",
          "fine_amount",
          "book_title",
          "barcode",
          "member_name",
          "member_email"
        ],
        "display_fields": [
          "id",
          "book_copy_id",
          "checkout_date",
          "due_date",
          "return_date",
          "renewal_count",
          "status"
        ],
        "search_fields": [],
        "filters": [
          "status",
          "member_id",
          "book_copy_id"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "member": {
        "name": "Member",
        "backend_module": "Authentication",
        "fields": [
          "id",
          "membership_number",
          "user"
        ],
        "computed": [],
        "display_fields": [
          "membership_number"
        ],
        "search_fields": [],
        "filters": [
          "membership_status"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      }
    },
    "relationships": []
  },
  "behaviour_ir": {
    "events": {
      "onTabChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.activeTab",
            "expr": "event.value"
          }
        ],
        "description": ""
      },
      "onSearchChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.searchText",
            "expr": "event.value"
          }
        ],
        "description": ""
      },
      "onDateRangeChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.dateRange",
            "expr": "event.value"
          }
        ],
        "description": ""
      },
      "onOverdueSelectionChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.selectedOverdueIds",
            "expr": "event.value"
          }
        ],
        "description": ""
      },
      "onSelectLoan": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.selectedLoanId",
            "expr": "event.value"
          }
        ],
        "description": ""
      }
    },
    "actions": {
      "88d4380c66dc46d39dc6487008fc7c1f": {
        "action_id": "88d4380c66dc46d39dc6487008fc7c1f",
        "trigger": "button_click",
        "target_component_id": "return_confirm_modal",
        "operation": "update",
        "description": "",
        "payload": {
          "loan_id": "$state.selectedLoanId"
        },
        "guard": null,
        "requires_confirmation": true,
        "confirmation_message": null,
        "validation_rules": [
          {
            "rule_id": "val_0",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"selectedLoanId\", \"message\": \"Please select a loan to return\", \"rule_id\": \"val_loan_selected\", \"type\": \"required\"}",
            "message": "{\"field\": \"selectedLoanId\", \"message\": \"Please select a loan to return\", \"rule_id\": \"val_loan_selected\", \"type\": \"required\"}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.returnModalVisible",
            "expr": "false"
          }
        ],
        "api_endpoint": "88d4380c66dc46d39dc6487008fc7c1f",
        "api_body": "{ checked_in_by_librarian_id: appContext.currentUser?.id, notes: null }",
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Book returned successfully",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "targets": [
                "activeLoans",
                "returnedTodayLoans",
                "overdueLoans"
              ]
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "1e2fcdd211e14034802af76d674cb29b": {
        "action_id": "1e2fcdd211e14034802af76d674cb29b",
        "trigger": "button_click",
        "target_component_id": "renew_confirm_modal",
        "operation": "update",
        "description": "",
        "payload": {
          "loan_id": "$state.selectedLoanId"
        },
        "guard": null,
        "requires_confirmation": true,
        "confirmation_message": null,
        "validation_rules": [
          {
            "rule_id": "val_0",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"selectedLoanId\", \"message\": \"Please select a loan to renew\", \"rule_id\": \"val_loan_renew\", \"type\": \"required\"}",
            "message": "{\"field\": \"selectedLoanId\", \"message\": \"Please select a loan to renew\", \"rule_id\": \"val_loan_renew\", \"type\": \"required\"}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.renewModalVisible",
            "expr": "false"
          }
        ],
        "api_endpoint": "1e2fcdd211e14034802af76d674cb29b",
        "api_body": "{ notes: null }",
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Book renewed successfully",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "targets": [
                "activeLoans"
              ]
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "e498077d02604c45823563308137d834": {
        "action_id": "e498077d02604c45823563308137d834",
        "trigger": "button_click",
        "target_component_id": "active_loans_table",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.returnModalVisible",
            "expr": "true"
          },
          {
            "target": "state.selectedLoanId",
            "expr": "event.record.id"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "ab44ad6c4d0843bfa33d3a9851862cfb": {
        "action_id": "ab44ad6c4d0843bfa33d3a9851862cfb",
        "trigger": "button_click",
        "target_component_id": "active_loans_table",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.renewModalVisible",
            "expr": "true"
          },
          {
            "target": "state.selectedLoanId",
            "expr": "event.record.id"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "4e4a8849e83944d6b18dddabd5ebbeb3": {
        "action_id": "4e4a8849e83944d6b18dddabd5ebbeb3",
        "trigger": "button_click",
        "target_component_id": "return_confirm_modal",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.returnModalVisible",
            "expr": "false"
          },
          {
            "target": "state.selectedLoanId",
            "expr": "null"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "d513f138a04c4dd487959e67188a2438": {
        "action_id": "d513f138a04c4dd487959e67188a2438",
        "trigger": "button_click",
        "target_component_id": "renew_confirm_modal",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.renewModalVisible",
            "expr": "false"
          },
          {
            "target": "state.selectedLoanId",
            "expr": "null"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "22a58aa99c254e019ee85d480fc63b55": {
        "action_id": "22a58aa99c254e019ee85d480fc63b55",
        "trigger": "button_click",
        "target_component_id": "bulk_notify_button",
        "operation": "custom",
        "description": "",
        "payload": {
          "member_ids": "$state.selectedOverdueIds"
        },
        "guard": null,
        "requires_confirmation": true,
        "confirmation_message": null,
        "validation_rules": [
          {
            "rule_id": "val_0",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"selectedOverdueIds\", \"message\": \"Please select at least one overdue loan\", \"min\": 1, \"rule_id\": \"val_selection\", \"type\": \"min_length\"}",
            "message": "{\"field\": \"selectedOverdueIds\", \"message\": \"Please select at least one overdue loan\", \"min\": 1, \"rule_id\": \"val_selection\", \"type\": \"min_length\"}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.selectedOverdueIds",
            "expr": "[]"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Overdue notifications sent successfully",
              "type": "success"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "db83c571bece4996b33baf75537f925e": {
        "action_id": "db83c571bece4996b33baf75537f925e",
        "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": "/staff/dashboard"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      }
    },
    "feedback": {
      "88d4380c66dc46d39dc6487008fc7c1f": {
        "action_id": "88d4380c66dc46d39dc6487008fc7c1f",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Book returned successfully",
        "error_message": "Failed to return book. Please try again.",
        "ui_updates": []
      },
      "1e2fcdd211e14034802af76d674cb29b": {
        "action_id": "1e2fcdd211e14034802af76d674cb29b",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Book renewed successfully. New due date has been set.",
        "error_message": "Failed to renew book. It may be reserved or at max renewals.",
        "ui_updates": []
      },
      "22a58aa99c254e019ee85d480fc63b55": {
        "action_id": "22a58aa99c254e019ee85d480fc63b55",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Overdue notifications sent to selected members",
        "error_message": "Failed to send some notifications. Please try again.",
        "ui_updates": []
      },
      "e498077d02604c45823563308137d834": {
        "action_id": "e498077d02604c45823563308137d834",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "ab44ad6c4d0843bfa33d3a9851862cfb": {
        "action_id": "ab44ad6c4d0843bfa33d3a9851862cfb",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "4e4a8849e83944d6b18dddabd5ebbeb3": {
        "action_id": "4e4a8849e83944d6b18dddabd5ebbeb3",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "d513f138a04c4dd487959e67188a2438": {
        "action_id": "d513f138a04c4dd487959e67188a2438",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "db83c571bece4996b33baf75537f925e": {
        "action_id": "db83c571bece4996b33baf75537f925e",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "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": "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%",
          "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 to Dashboard",
        "description": null,
        "bind": null,
        "onClick": "navigateToDashboard",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "text",
          "icon": "ArrowLeftOutlined"
        },
        "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": "Circulation Management",
        "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
      },
      "filters_section": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "bordered": false
        },
        "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
      },
      "filters_row": {
        "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": "16px",
          "flexWrap": "wrap",
          "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",
        "description": null,
        "bind": "state.searchText",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Search by member name or book title...",
          "allowClear": true,
          "style": {
            "width": 320
          }
        },
        "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
      },
      "date_range_picker": {
        "type": "DatePicker.RangePicker",
        "label": "Date Range",
        "description": null,
        "bind": "state.dateRange",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": [
            "Start Date",
            "End Date"
          ]
        },
        "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
      },
      "tabs_container": {
        "type": "Tabs",
        "label": null,
        "description": null,
        "bind": "state.activeTab",
        "onClick": "onTabChange",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "items": [
            {
              "key": "active",
              "label": "Active Loans"
            },
            {
              "key": "overdue",
              "label": "Overdue"
            },
            {
              "key": "returned",
              "label": "Returned Today"
            }
          ],
          "type": "card"
        },
        "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
      },
      "active_loans_panel": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "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
      },
      "active_loans_table": {
        "type": "Table",
        "label": "Active Loans",
        "description": null,
        "bind": "state.activeLoans",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "columns": [
            {
              "title": "Loan ID",
              "dataIndex": "id",
              "key": "id",
              "width": 100,
              "ellipsis": true
            },
            {
              "title": "Book Title",
              "dataIndex": "book_title",
              "key": "book_title"
            },
            {
              "title": "Barcode",
              "dataIndex": "barcode",
              "key": "barcode",
              "width": 120
            },
            {
              "title": "Member Name",
              "dataIndex": "member_name",
              "key": "member_name"
            },
            {
              "title": "Checkout Date",
              "dataIndex": "checkout_date",
              "key": "checkout_date",
              "width": 130
            },
            {
              "title": "Due Date",
              "dataIndex": "due_date",
              "key": "due_date",
              "width": 130
            },
            {
              "title": "Renewals",
              "dataIndex": "renewal_count",
              "key": "renewal_count",
              "width": 100
            },
            {
              "title": "Actions",
              "key": "actions",
              "width": 180
            }
          ],
          "rowKey": "id",
          "pagination": {
            "pageSize": 20
          },
          "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
      },
      "overdue_panel": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "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
      },
      "bulk_actions_bar": {
        "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": "16px",
          "padding": "12px 16px",
          "background": "#fff7e6",
          "borderRadius": "6px",
          "border": "1px solid #ffd591"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "selected_count_text": {
        "type": "Typography.Text",
        "label": null,
        "description": null,
        "bind": "derived.selectedOverdueCount",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "warning"
        },
        "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
      },
      "bulk_notify_button": {
        "type": "Button",
        "label": "Send Overdue Notifications",
        "description": null,
        "bind": null,
        "onClick": "sendOverdueNotifications",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "danger": true,
          "icon": "MailOutlined",
          "disabled": "state.selectedOverdueIds.length === 0"
        },
        "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
      },
      "overdue_table": {
        "type": "Table",
        "label": "Overdue Loans",
        "description": null,
        "bind": "state.overdueLoans",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "columns": [
            {
              "title": "Loan ID",
              "dataIndex": "id",
              "key": "id",
              "width": 100,
              "ellipsis": true
            },
            {
              "title": "Book Title",
              "dataIndex": "book_title",
              "key": "book_title"
            },
            {
              "title": "Member Name",
              "dataIndex": "member_name",
              "key": "member_name"
            },
            {
              "title": "Member Email",
              "dataIndex": "member_email",
              "key": "member_email"
            },
            {
              "title": "Due Date",
              "dataIndex": "due_date",
              "key": "due_date",
              "width": 130
            },
            {
              "title": "Days Overdue",
              "dataIndex": "days_overdue",
              "key": "days_overdue",
              "width": 120
            },
            {
              "title": "Fine Amount",
              "dataIndex": "fine_amount",
              "key": "fine_amount",
              "width": 120
            },
            {
              "title": "Actions",
              "key": "actions",
              "width": 200
            }
          ],
          "rowKey": "id",
          "rowSelection": {
            "type": "checkbox",
            "onChange": "onOverdueSelectionChange"
          },
          "pagination": {
            "pageSize": 20
          },
          "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
      },
      "returned_panel": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "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
      },
      "returned_table": {
        "type": "Table",
        "label": "Returned Today",
        "description": null,
        "bind": "state.returnedTodayLoans",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "columns": [
            {
              "title": "Loan ID",
              "dataIndex": "id",
              "key": "id",
              "width": 100,
              "ellipsis": true
            },
            {
              "title": "Book Title",
              "dataIndex": "book_title",
              "key": "book_title"
            },
            {
              "title": "Member Name",
              "dataIndex": "member_name",
              "key": "member_name"
            },
            {
              "title": "Return Date",
              "dataIndex": "return_date",
              "key": "return_date",
              "width": 130
            },
            {
              "title": "Condition",
              "dataIndex": "condition_status",
              "key": "condition_status",
              "width": 120
            },
            {
              "title": "Fine Applied",
              "dataIndex": "fine_amount",
              "key": "fine_amount",
              "width": 120
            }
          ],
          "rowKey": "id",
          "pagination": {
            "pageSize": 20
          },
          "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
      },
      "return_confirm_modal": {
        "type": "Modal",
        "label": "Confirm Return",
        "description": null,
        "bind": "state.returnModalVisible",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Confirm Book Return",
          "okText": "Confirm Return",
          "cancelText": "Cancel",
          "onOk": "returnBook",
          "onCancel": "closeReturnModal"
        },
        "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
      },
      "return_modal_content": {
        "type": "Typography.Text",
        "label": "Are you sure you want to process this book return? Any applicable overdue fines will be calculated automatically.",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "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
      },
      "renew_confirm_modal": {
        "type": "Modal",
        "label": "Confirm Renewal",
        "description": null,
        "bind": "state.renewModalVisible",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Confirm Book Renewal",
          "okText": "Confirm Renewal",
          "cancelText": "Cancel",
          "onOk": "renewBook",
          "onCancel": "closeRenewModal"
        },
        "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
      },
      "renew_modal_content": {
        "type": "Typography.Text",
        "label": "Are you sure you want to renew this loan? The due date will be extended by the standard loan period.",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "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",
        "filters_section",
        "tabs_container",
        "return_confirm_modal",
        "renew_confirm_modal"
      ],
      "page_header": [
        "header_left"
      ],
      "header_left": [
        "back_button",
        "page_title"
      ],
      "filters_section": [
        "filters_row"
      ],
      "filters_row": [
        "search_input",
        "date_range_picker"
      ],
      "tabs_container": [
        "active_loans_panel",
        "overdue_panel",
        "returned_panel"
      ],
      "active_loans_panel": [
        "active_loans_table"
      ],
      "overdue_panel": [
        "bulk_actions_bar",
        "overdue_table"
      ],
      "bulk_actions_bar": [
        "selected_count_text",
        "bulk_notify_button"
      ],
      "returned_panel": [
        "returned_table"
      ],
      "return_confirm_modal": [
        "return_modal_content"
      ],
      "renew_confirm_modal": [
        "renew_modal_content"
      ]
    },
    "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": 0,
        "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": 16,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "filters_section": {
        "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
      },
      "filters_row": {
        "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
      },
      "tabs_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
      },
      "active_loans_panel": {
        "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
      },
      "overdue_panel": {
        "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
      },
      "bulk_actions_bar": {
        "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
      },
      "returned_panel": {
        "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
      },
      "return_confirm_modal": {
        "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
      },
      "renew_confirm_modal": {
        "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_zone",
        "component": "main_container",
        "anchor": "top-left",
        "size_hint": "full-width",
        "z_layer": "base",
        "notes": "Main page container with full viewport height"
      },
      {
        "zone_id": "return_modal_zone",
        "component": "return_confirm_modal",
        "anchor": "center",
        "size_hint": "auto",
        "z_layer": "overlay",
        "notes": "Return confirmation modal overlay"
      },
      {
        "zone_id": "renew_modal_zone",
        "component": "renew_confirm_modal",
        "anchor": "center",
        "size_hint": "auto",
        "z_layer": "overlay",
        "notes": "Renew confirmation modal overlay"
      }
    ],
    "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
}
