{
  "page_ir": {
    "page_id": "return_process",
    "page_goal": "Enable librarians to process book returns by scanning/entering book ID or ISBN, displaying loan details, calculating overdue fines, handling damage assessment, and completing the return transaction",
    "style": {
      "tone": "professional",
      "theme": "light",
      "density": "comfortable",
      "color_intent": "neutral with status-based color coding for overdue/on-time"
    },
    "accessibility": {
      "required_labels": [
        "search_input",
        "damage_select",
        "process_return_button",
        "book_info_section",
        "loan_info_section"
      ],
      "skip_navigation": true,
      "focus_management": true,
      "announce_changes": []
    },
    "responsive": {
      "breakpoints": {
        "sm": 576,
        "md": 768,
        "lg": 1024
      },
      "collapse_rules": [
        "stack_columns_on_small"
      ],
      "hidden_on_small": [],
      "stack_on_small": []
    },
    "constraints": [
      "librarian_role_required",
      "active_loan_must_exist_for_return"
    ],
    "seo_title": null,
    "seo_description": null
  },
  "data_ir": {
    "types": {},
    "state": {
      "searchQuery": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "selectedLoan": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "bookInfo": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "memberInfo": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "damageLevel": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {
          "enum": [
            "",
            "minor",
            "moderate",
            "severe"
          ]
        },
        "item_type": null
      },
      "loading": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "returnProcessing": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "returnResult": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "pendingReservations": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      }
    },
    "derived": {
      "isOverdue": {
        "type": "boolean",
        "expr": "state.selectedLoan ? new Date() > new Date(state.selectedLoan.due_date) : false",
        "deps": []
      },
      "overdueDays": {
        "type": "number",
        "expr": "state.selectedLoan && new Date() > new Date(state.selectedLoan.due_date) ? Math.ceil((new Date() - new Date(state.selectedLoan.due_date)) / (1000*60*60*24)) : 0",
        "deps": []
      },
      "overdueFineAmount": {
        "type": "number",
        "expr": "Math.min(derived.overdueDays * (appContext.librarySettings?.dailyFineRate || 0.5), appContext.librarySettings?.maxFineCap || 25)",
        "deps": []
      },
      "damageFineAmount": {
        "type": "number",
        "expr": "state.damageLevel === 'minor' ? 5 : state.damageLevel === 'moderate' ? 15 : state.damageLevel === 'severe' ? 50 : 0",
        "deps": []
      },
      "totalFineAmount": {
        "type": "number",
        "expr": "derived.overdueFineAmount + derived.damageFineAmount",
        "deps": []
      },
      "loanFound": {
        "type": "boolean",
        "expr": "state.selectedLoan !== null",
        "deps": []
      },
      "returnCompleted": {
        "type": "boolean",
        "expr": "state.returnResult !== null",
        "deps": []
      }
    }
  },
  "data_fetch_ir": {
    "endpoints": {
      "23866096233046e29b03084722dcd6b7": {
        "endpoint_id": "23866096233046e29b03084722dcd6b7",
        "module": "Circulation",
        "endpoint": "/circulation/loans",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "book_id": "$state.searchQuery",
          "loan_status": "ACTIVE",
          "limit": 1
        },
        "body": null,
        "fields": [
          "id",
          "book_id",
          "member_id",
          "librarian_id",
          "checkout_date",
          "due_date",
          "return_date",
          "renewal_count",
          "status",
          "notes"
        ],
        "response_target": "selectedLoan",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "e0eb8804b21d46c09e04a3173439bba0": {
        "endpoint_id": "e0eb8804b21d46c09e04a3173439bba0",
        "module": "",
        "endpoint": "/books/{book_id}",
        "method": "GET",
        "path_params": {
          "book_id": "$state.selectedLoan.book_id"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "id",
          "title",
          "isbn",
          "status",
          "location"
        ],
        "response_target": "bookInfo",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "660ad613ce564911973c1512a161a003": {
        "endpoint_id": "660ad613ce564911973c1512a161a003",
        "module": "User Management",
        "endpoint": "/users/members/{member_id}/details",
        "method": "GET",
        "path_params": {
          "member_id": "$state.selectedLoan.member_id"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "id",
          "user_id",
          "membership_number"
        ],
        "response_target": "memberInfo",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "b0d69c7a3d764c80b6c0597f4b291b31": {
        "endpoint_id": "b0d69c7a3d764c80b6c0597f4b291b31",
        "module": "Circulation",
        "endpoint": "/circulation/loans/{loan_id}/return",
        "method": "POST",
        "path_params": {
          "loan_id": "$state.selectedLoan.id"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "id",
          "book_id",
          "member_id",
          "checkout_date",
          "due_date",
          "return_date",
          "status"
        ],
        "response_target": "returnResult",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "b4fe8fecfc0046df9ad29365a9c0b609": {
        "endpoint_id": "b4fe8fecfc0046df9ad29365a9c0b609",
        "module": "Circulation",
        "endpoint": "/circulation/reservations",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "book_id": "$state.selectedLoan.book_id",
          "reservation_status": "PENDING",
          "limit": 5
        },
        "body": null,
        "fields": [
          "id",
          "member_id",
          "queue_position",
          "reservation_date",
          "status"
        ],
        "response_target": "pendingReservations",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "40c26c5a65c24f1c871876aa76ee25de": {
        "endpoint_id": "40c26c5a65c24f1c871876aa76ee25de",
        "module": "Fines",
        "endpoint": "/fines/",
        "method": "POST",
        "path_params": {},
        "query_params": {},
        "body": {},
        "fields": [
          "id",
          "member_id",
          "loan_id",
          "amount",
          "reason",
          "status"
        ],
        "response_target": "createOverdueFine_data",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "2b9e464198c542b0b853d9eb916cbb1d": {
        "endpoint_id": "2b9e464198c542b0b853d9eb916cbb1d",
        "module": "Fines",
        "endpoint": "/fines/",
        "method": "POST",
        "path_params": {},
        "query_params": {},
        "body": {},
        "fields": [
          "id",
          "member_id",
          "loan_id",
          "amount",
          "reason",
          "status"
        ],
        "response_target": "createDamageFine_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",
          "book_id",
          "member_id",
          "librarian_id",
          "checkout_date",
          "due_date",
          "return_date",
          "renewal_count",
          "status",
          "notes",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "book_id",
          "member_id",
          "checkout_date",
          "due_date",
          "status"
        ],
        "search_fields": [],
        "filters": [
          "status",
          "book_id",
          "member_id"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "book": {
        "name": "Book",
        "backend_module": "",
        "fields": [
          "id",
          "isbn",
          "title",
          "subtitle",
          "publisher_id",
          "publication_date",
          "edition",
          "language",
          "pages",
          "description",
          "book_format",
          "total_copies",
          "available_copies",
          "location",
          "status",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "title",
          "isbn",
          "status"
        ],
        "search_fields": [],
        "filters": [
          "status"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "reservation": {
        "name": "Reservation",
        "backend_module": "Circulation",
        "fields": [
          "id",
          "book_id",
          "member_id",
          "reservation_date",
          "expiry_date",
          "queue_position",
          "status",
          "notified_date",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "member_id",
          "queue_position",
          "status"
        ],
        "search_fields": [],
        "filters": [
          "book_id",
          "status"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "member": {
        "name": "Member",
        "backend_module": "User Management",
        "fields": [
          "id",
          "user_id",
          "membership_number",
          "membership_date",
          "membership_expiry",
          "borrowing_limit",
          "account_standing",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "membership_number",
          "account_standing"
        ],
        "search_fields": [],
        "filters": [],
        "default_sort": null,
        "default_sort_dir": "asc"
      }
    },
    "relationships": []
  },
  "behaviour_ir": {
    "events": {
      "onSearchChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.searchQuery",
            "expr": "event.value"
          }
        ],
        "description": ""
      },
      "onDamageChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.damageLevel",
            "expr": "event.value"
          }
        ],
        "description": ""
      },
      "resetForm": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.searchQuery",
            "expr": "''"
          },
          {
            "target": "state.selectedLoan",
            "expr": "null"
          },
          {
            "target": "state.bookInfo",
            "expr": "null"
          },
          {
            "target": "state.memberInfo",
            "expr": "null"
          },
          {
            "target": "state.damageLevel",
            "expr": "''"
          },
          {
            "target": "state.returnResult",
            "expr": "null"
          },
          {
            "target": "state.pendingReservations",
            "expr": "[]"
          }
        ],
        "description": ""
      }
    },
    "actions": {
      "15373c8387e6414bbd47cd691fee5f0c": {
        "action_id": "15373c8387e6414bbd47cd691fee5f0c",
        "trigger": "form_submit",
        "target_component_id": "search_input",
        "operation": "read",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [
          {
            "rule_id": "val_0",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"searchQuery\", \"message\": \"Please enter a Book ID or ISBN\", \"rule_id\": \"val_search_required\", \"type\": \"required\"}",
            "message": "{\"field\": \"searchQuery\", \"message\": \"Please enter a Book ID or ISBN\", \"rule_id\": \"val_search_required\", \"type\": \"required\"}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.loading",
            "expr": "true"
          }
        ],
        "api_endpoint": "23866096233046e29b03084722dcd6b7",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "b0d69c7a3d764c80b6c0597f4b291b31": {
        "action_id": "b0d69c7a3d764c80b6c0597f4b291b31",
        "trigger": "button_click",
        "target_component_id": "process_return_btn",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": true,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.returnProcessing",
            "expr": "true"
          }
        ],
        "api_endpoint": "b0d69c7a3d764c80b6c0597f4b291b31",
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Book return processed successfully!",
              "type": "success"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "590c2aa423fa4c09b77f00027123179f": {
        "action_id": "590c2aa423fa4c09b77f00027123179f",
        "trigger": "button_click",
        "target_component_id": "another_return_btn",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.searchQuery",
            "expr": "''"
          },
          {
            "target": "state.selectedLoan",
            "expr": "null"
          },
          {
            "target": "state.bookInfo",
            "expr": "null"
          },
          {
            "target": "state.memberInfo",
            "expr": "null"
          },
          {
            "target": "state.damageLevel",
            "expr": "''"
          },
          {
            "target": "state.returnResult",
            "expr": "null"
          },
          {
            "target": "state.pendingReservations",
            "expr": "[]"
          },
          {
            "target": "state.returnProcessing",
            "expr": "false"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "f723ce9b1a2d4e4fa521dcc95ef8a914": {
        "action_id": "f723ce9b1a2d4e4fa521dcc95ef8a914",
        "trigger": "button_click",
        "target_component_id": "back_to_dashboard_btn",
        "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": "/librarian/dashboard"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "4e22f8e1a8b24035a3cfb6bc7567c868": {
        "action_id": "4e22f8e1a8b24035a3cfb6bc7567c868",
        "trigger": "button_click",
        "target_component_id": "view_loans_btn",
        "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": "/circulation/loans"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      }
    },
    "feedback": {
      "15373c8387e6414bbd47cd691fee5f0c": {
        "action_id": "15373c8387e6414bbd47cd691fee5f0c",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Loan record found",
        "error_message": "No active loan found for this book",
        "ui_updates": []
      },
      "b0d69c7a3d764c80b6c0597f4b291b31": {
        "action_id": "b0d69c7a3d764c80b6c0597f4b291b31",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Book return processed successfully!",
        "error_message": "Failed to process return. Please try again.",
        "ui_updates": []
      },
      "590c2aa423fa4c09b77f00027123179f": {
        "action_id": "590c2aa423fa4c09b77f00027123179f",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "f723ce9b1a2d4e4fa521dcc95ef8a914": {
        "action_id": "f723ce9b1a2d4e4fa521dcc95ef8a914",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "4e22f8e1a8b24035a3cfb6bc7567c868": {
        "action_id": "4e22f8e1a8b24035a3cfb6bc7567c868",
        "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%",
          "background": "#f5f5f5",
          "padding": "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
      },
      "page_header": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "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
      },
      "page_title": {
        "type": "Typography.Title",
        "label": "Book Return",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "level": 2
        },
        "dynamic_props": {},
        "styles": {
          "marginBottom": "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
      },
      "page_breadcrumb": {
        "type": "Breadcrumb",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "items": [
            {
              "title": "Circulation"
            },
            {
              "title": "Book Return"
            }
          ]
        },
        "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
      },
      "nav_buttons_row": {
        "type": "Space",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "size": "middle"
        },
        "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
      },
      "back_to_dashboard_btn": {
        "type": "Button",
        "label": "Back to Dashboard",
        "description": null,
        "bind": null,
        "onClick": "navigateToDashboard",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "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
      },
      "view_loans_btn": {
        "type": "Button",
        "label": "View All Loans",
        "description": null,
        "bind": null,
        "onClick": "navigateToLoans",
        "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
      },
      "search_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Scan / Enter Book"
        },
        "dynamic_props": {},
        "styles": {
          "marginBottom": "24px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "search_input": {
        "type": "Input.Search",
        "label": "Book ID or ISBN",
        "description": null,
        "bind": "state.searchQuery",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Enter Book ID or ISBN and press Enter",
          "enterButton": "Search",
          "size": "large",
          "loading": "state.loading",
          "allowClear": true
        },
        "dynamic_props": {},
        "styles": {
          "maxWidth": "600px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "loan_details_section": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "visible": "derived.loanFound && !derived.returnCompleted"
        },
        "dynamic_props": {},
        "styles": {
          "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
      },
      "info_row": {
        "type": "Row",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "gutter": [
            16,
            16
          ]
        },
        "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
      },
      "book_info_col": {
        "type": "Col",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "xs": 24,
          "md": 12
        },
        "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
      },
      "book_info_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Book Information",
          "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
      },
      "book_title_desc": {
        "type": "Descriptions",
        "label": null,
        "description": null,
        "bind": "state.bookInfo",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "column": 1,
          "size": "small",
          "items": [
            {
              "label": "Title",
              "field": "title"
            },
            {
              "label": "ISBN",
              "field": "isbn"
            },
            {
              "label": "Location",
              "field": "location"
            }
          ]
        },
        "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
      },
      "loan_info_col": {
        "type": "Col",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "xs": 24,
          "md": 12
        },
        "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
      },
      "loan_info_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Loan Information",
          "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
      },
      "loan_desc": {
        "type": "Descriptions",
        "label": null,
        "description": null,
        "bind": "state.selectedLoan",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "column": 1,
          "size": "small",
          "items": [
            {
              "label": "Member",
              "field": "member_id"
            },
            {
              "label": "Checkout Date",
              "field": "checkout_date"
            },
            {
              "label": "Due Date",
              "field": "due_date"
            },
            {
              "label": "Renewals",
              "field": "renewal_count"
            }
          ]
        },
        "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_status_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Return Status",
          "size": "small"
        },
        "dynamic_props": {},
        "styles": {
          "marginTop": "16px",
          "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
      },
      "status_alert_ontime": {
        "type": "Alert",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "success",
          "message": "On Time",
          "description": "This book is being returned on time. No overdue fine.",
          "showIcon": true,
          "visible": "derived.loanFound && !derived.isOverdue"
        },
        "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
      },
      "status_alert_overdue": {
        "type": "Alert",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "error",
          "message": "Overdue",
          "description": "This book is overdue by {derived.overdueDays} day(s). Fine: ${derived.overdueFineAmount}",
          "showIcon": true,
          "visible": "derived.loanFound && derived.isOverdue"
        },
        "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
      },
      "damage_section": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Damage Assessment (Optional)",
          "size": "small"
        },
        "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
      },
      "damage_select": {
        "type": "Select",
        "label": "Damage Level",
        "description": null,
        "bind": "state.damageLevel",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Select damage level if applicable",
          "allowClear": true,
          "options": [
            {
              "value": "minor",
              "label": "Minor ($5)"
            },
            {
              "value": "moderate",
              "label": "Moderate ($15)"
            },
            {
              "value": "severe",
              "label": "Severe ($50)"
            }
          ],
          "style": {
            "width": "300px"
          }
        },
        "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
      },
      "damage_fine_text": {
        "type": "Typography.Text",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "warning",
          "content": "Damage fine: ${derived.damageFineAmount}",
          "visible": "state.damageLevel !== ''"
        },
        "dynamic_props": {},
        "styles": {
          "marginTop": "8px",
          "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
      },
      "total_fine_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "size": "small",
          "visible": "derived.totalFineAmount > 0"
        },
        "dynamic_props": {},
        "styles": {
          "marginBottom": "16px",
          "background": "#fff2e8",
          "borderColor": "#ffbb96"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "total_fine_statistic": {
        "type": "Statistic",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Total Fine Amount",
          "value": "derived.totalFineAmount",
          "prefix": "$",
          "precision": 2,
          "valueStyle": {
            "color": "#cf1322"
          }
        },
        "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
      },
      "process_return_btn": {
        "type": "Button",
        "label": "Process Return",
        "description": null,
        "bind": null,
        "onClick": "processReturn",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "size": "large",
          "icon": "CheckCircleOutlined",
          "loading": "state.returnProcessing",
          "block": false
        },
        "dynamic_props": {},
        "styles": {
          "marginTop": "8px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "return_success_section": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "visible": "derived.returnCompleted"
        },
        "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
      },
      "success_result": {
        "type": "Result",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "status": "success",
          "title": "Book Return Processed Successfully",
          "subTitle": "The book has been returned and the loan record has been updated."
        },
        "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
      },
      "receipt_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Return Receipt",
          "size": "small"
        },
        "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
      },
      "receipt_desc": {
        "type": "Descriptions",
        "label": null,
        "description": null,
        "bind": "state.returnResult",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "column": 2,
          "size": "small",
          "items": [
            {
              "label": "Loan ID",
              "field": "id"
            },
            {
              "label": "Book ID",
              "field": "book_id"
            },
            {
              "label": "Return Date",
              "field": "return_date"
            },
            {
              "label": "Status",
              "field": "status"
            }
          ]
        },
        "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
      },
      "fines_generated_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Fines Generated",
          "size": "small",
          "visible": "derived.totalFineAmount > 0"
        },
        "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
      },
      "fines_summary_list": {
        "type": "List",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "size": "small",
          "dataSource": "computed_fines_list"
        },
        "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
      },
      "reservation_alert": {
        "type": "Alert",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "info",
          "message": "Pending Reservations",
          "description": "This book has pending reservations. The next member in queue has been notified.",
          "showIcon": true,
          "visible": "state.pendingReservations.length > 0"
        },
        "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
      },
      "success_actions_row": {
        "type": "Space",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "size": "middle"
        },
        "dynamic_props": {},
        "styles": {
          "marginTop": "16px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "another_return_btn": {
        "type": "Button",
        "label": "Process Another Return",
        "description": null,
        "bind": null,
        "onClick": "processAnotherReturn",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "size": "large",
          "icon": "ReloadOutlined"
        },
        "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
      },
      "go_dashboard_btn": {
        "type": "Button",
        "label": "Back to Dashboard",
        "description": null,
        "bind": null,
        "onClick": "navigateToDashboard",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "size": "large"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      }
    }
  },
  "layout_ir": {
    "root": "main_container",
    "children": {
      "main_container": [
        "page_header",
        "nav_buttons_row",
        "search_card",
        "loan_details_section",
        "return_success_section"
      ],
      "page_header": [
        "page_title",
        "page_breadcrumb"
      ],
      "nav_buttons_row": [
        "back_to_dashboard_btn",
        "view_loans_btn"
      ],
      "search_card": [
        "search_input"
      ],
      "loan_details_section": [
        "info_row",
        "return_status_card",
        "damage_section",
        "total_fine_card",
        "process_return_btn"
      ],
      "info_row": [
        "book_info_col",
        "loan_info_col"
      ],
      "book_info_col": [
        "book_info_card"
      ],
      "book_info_card": [
        "book_title_desc"
      ],
      "loan_info_col": [
        "loan_info_card"
      ],
      "loan_info_card": [
        "loan_desc"
      ],
      "return_status_card": [
        "status_alert_ontime",
        "status_alert_overdue"
      ],
      "damage_section": [
        "damage_select",
        "damage_fine_text"
      ],
      "total_fine_card": [
        "total_fine_statistic"
      ],
      "return_success_section": [
        "success_result",
        "receipt_card",
        "fines_generated_card",
        "reservation_alert",
        "success_actions_row"
      ],
      "receipt_card": [
        "receipt_desc"
      ],
      "fines_generated_card": [
        "fines_summary_list"
      ],
      "success_actions_row": [
        "another_return_btn",
        "go_dashboard_btn"
      ]
    },
    "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": "vertical",
        "gap": 4,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "nav_buttons_row": {
        "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
      },
      "search_card": {
        "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
      },
      "loan_details_section": {
        "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
      },
      "info_row": {
        "type": "grid",
        "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
      },
      "book_info_col": {
        "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
      },
      "book_info_card": {
        "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
      },
      "loan_info_col": {
        "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
      },
      "loan_info_card": {
        "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
      },
      "return_status_card": {
        "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
      },
      "damage_section": {
        "type": "vertical",
        "gap": 8,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "total_fine_card": {
        "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_success_section": {
        "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
      },
      "receipt_card": {
        "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
      },
      "fines_generated_card": {
        "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
      },
      "success_actions_row": {
        "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
      }
    },
    "layout_zones": [
      {
        "zone_id": "main_zone",
        "component": "main_container",
        "anchor": "top-left",
        "size_hint": "full-width",
        "z_layer": "base",
        "notes": "Full page container with vertical stacking"
      }
    ],
    "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
}
