{
  "page_ir": {
    "page_id": "admin_audit_logs",
    "page_goal": "Admin audit log viewer with paginated, filterable, sortable table of system activity logs with export capability and retention notice",
    "style": {
      "tone": "professional",
      "theme": "light",
      "density": "comfortable",
      "color_intent": "neutral admin interface with subtle informational accents"
    },
    "accessibility": {
      "required_labels": [
        "Date range filter",
        "User search filter",
        "Action type filter",
        "Audit logs table",
        "Export button",
        "Retention notice"
      ],
      "skip_navigation": true,
      "focus_management": true,
      "announce_changes": []
    },
    "responsive": {
      "breakpoints": {
        "xs": 480,
        "sm": 576,
        "md": 768,
        "lg": 992,
        "xl": 1200
      },
      "collapse_rules": [
        "Filter controls stack vertically below md breakpoint",
        "Table scrolls horizontally below lg breakpoint",
        "Details column hidden on small screens"
      ],
      "hidden_on_small": [
        "details_column"
      ],
      "stack_on_small": []
    },
    "constraints": [
      "Admin role required to access this page",
      "Audit logs are read-only for viewing purposes",
      "Retention notice must always be visible",
      "Logs retained for minimum 90 days"
    ],
    "seo_title": null,
    "seo_description": null
  },
  "data_ir": {
    "types": {},
    "state": {
      "auditLogs": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "loading": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "totalCount": {
        "type": "number",
        "initial": 0,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "currentPage": {
        "type": "number",
        "initial": 1,
        "required": false,
        "constraints": {
          "min": 1
        },
        "item_type": null
      },
      "pageSize": {
        "type": "number",
        "initial": 20,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterUserSearch": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterAction": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterEntityType": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterDateRange": {
        "type": "array",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "sortOrder": {
        "type": "string",
        "initial": "descend",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "expandedRowKeys": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "exportLoading": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "detailModalVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "selectedLog": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      }
    },
    "derived": {
      "offset": {
        "type": "number",
        "expr": "(state.currentPage - 1) * state.pageSize",
        "deps": []
      },
      "hasFilters": {
        "type": "boolean",
        "expr": "state.filterUserSearch !== '' || state.filterAction !== '' || state.filterEntityType !== '' || state.filterDateRange !== null",
        "deps": []
      }
    }
  },
  "data_fetch_ir": {
    "endpoints": {
      "d4e1031788154edda7cd26b7469f6ad4": {
        "endpoint_id": "d4e1031788154edda7cd26b7469f6ad4",
        "module": "Audit Logs",
        "endpoint": "/audit-logs/",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "limit": "$state.pageSize",
          "offset": "$derived.offset",
          "user_id": "$state.filterUserSearch",
          "action": "$state.filterAction",
          "entity_type": "$state.filterEntityType"
        },
        "body": null,
        "fields": [
          "id",
          "log_id",
          "user_id",
          "action",
          "entity_type",
          "entity_id",
          "timestamp",
          "ip_address",
          "user_agent",
          "details",
          "created_at",
          "updated_at"
        ],
        "response_target": "auditLogs",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "4f764e8b016a47c2877f22c84f6ad965": {
        "endpoint_id": "4f764e8b016a47c2877f22c84f6ad965",
        "module": "Audit Logs",
        "endpoint": "/audit-logs/{auditlog_id}/details",
        "method": "GET",
        "path_params": {
          "auditlog_id": "$state.selectedLog.id"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "id",
          "log_id",
          "user_id",
          "action",
          "entity_type",
          "entity_id",
          "timestamp",
          "ip_address",
          "user_agent",
          "details",
          "created_at",
          "updated_at",
          "user_first_name",
          "user_last_name"
        ],
        "response_target": "selectedLog",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      }
    }
  },
  "data_model_ir": {
    "entities": {
      "auditLog": {
        "name": "AuditLog",
        "backend_module": "Audit Logs",
        "fields": [
          "id",
          "log_id",
          "user_id",
          "action",
          "entity_type",
          "entity_id",
          "timestamp",
          "ip_address",
          "user_agent",
          "details",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "timestamp",
          "user_id",
          "action",
          "entity_type",
          "entity_id",
          "details",
          "ip_address"
        ],
        "search_fields": [
          "user_id",
          "action",
          "entity_type"
        ],
        "filters": [
          "user_id",
          "action",
          "entity_type",
          "entity_id"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "auditLogDetail": {
        "name": "AuditLogDetail",
        "backend_module": "Audit Logs",
        "fields": [
          "id",
          "log_id",
          "user_id",
          "action",
          "entity_type",
          "entity_id",
          "timestamp",
          "ip_address",
          "user_agent",
          "details",
          "created_at",
          "updated_at",
          "user_first_name",
          "user_last_name"
        ],
        "computed": [],
        "display_fields": [
          "timestamp",
          "user_first_name",
          "user_last_name",
          "action",
          "entity_type",
          "entity_id",
          "details",
          "ip_address",
          "user_agent"
        ],
        "search_fields": [],
        "filters": [],
        "default_sort": null,
        "default_sort_dir": "asc"
      }
    },
    "relationships": []
  },
  "behaviour_ir": {
    "events": {
      "onPageChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.currentPage",
            "expr": "event.page"
          },
          {
            "target": "state.pageSize",
            "expr": "event.pageSize"
          }
        ],
        "description": ""
      },
      "onUserSearchChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterUserSearch",
            "expr": "event.value"
          },
          {
            "target": "state.currentPage",
            "expr": "1"
          }
        ],
        "description": ""
      },
      "onActionFilterChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterAction",
            "expr": "event.value"
          },
          {
            "target": "state.currentPage",
            "expr": "1"
          }
        ],
        "description": ""
      },
      "onEntityTypeFilterChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterEntityType",
            "expr": "event.value"
          },
          {
            "target": "state.currentPage",
            "expr": "1"
          }
        ],
        "description": ""
      },
      "onDateRangeChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterDateRange",
            "expr": "event.value"
          },
          {
            "target": "state.currentPage",
            "expr": "1"
          }
        ],
        "description": ""
      },
      "onSortChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.sortOrder",
            "expr": "event.order || 'descend'"
          }
        ],
        "description": ""
      },
      "onExpandRow": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.expandedRowKeys",
            "expr": "event.expandedKeys"
          }
        ],
        "description": ""
      },
      "onCloseDetailModal": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.detailModalVisible",
            "expr": "false"
          },
          {
            "target": "state.selectedLog",
            "expr": "null"
          }
        ],
        "description": ""
      }
    },
    "actions": {
      "442ecd3ff5b144b7918b777996adff7e": {
        "action_id": "442ecd3ff5b144b7918b777996adff7e",
        "trigger": "button_click",
        "target_component_id": "filter_apply_button",
        "operation": "read",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.loading",
            "expr": "true"
          }
        ],
        "api_endpoint": "d4e1031788154edda7cd26b7469f6ad4",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "866a0bb643e747e287b54604e71400a8": {
        "action_id": "866a0bb643e747e287b54604e71400a8",
        "trigger": "row_click",
        "target_component_id": "audit_logs_table",
        "operation": "read",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.selectedLog",
            "expr": "event.record"
          },
          {
            "target": "state.detailModalVisible",
            "expr": "true"
          }
        ],
        "api_endpoint": "4f764e8b016a47c2877f22c84f6ad965",
        "api_body": null,
        "side_effects": [
          {
            "type": "modal_open",
            "config": {
              "modal_id": "detail_modal"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "efddfafa35e240e0b205a9f76db36f11": {
        "action_id": "efddfafa35e240e0b205a9f76db36f11",
        "trigger": "button_click",
        "target_component_id": "export_button",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.exportLoading",
            "expr": "true"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "download",
            "config": {
              "format": "csv",
              "filename": "audit_logs_export.csv",
              "data_source": "state.auditLogs"
            }
          },
          {
            "type": "toast",
            "config": {
              "message": "Audit logs exported successfully",
              "type": "success"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "d41fe0ae29994153a229a85068c824d4": {
        "action_id": "d41fe0ae29994153a229a85068c824d4",
        "trigger": "button_click",
        "target_component_id": "clear_filters_button",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.filterUserSearch",
            "expr": "''"
          },
          {
            "target": "state.filterAction",
            "expr": "''"
          },
          {
            "target": "state.filterEntityType",
            "expr": "''"
          },
          {
            "target": "state.filterDateRange",
            "expr": "null"
          },
          {
            "target": "state.currentPage",
            "expr": "1"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Filters cleared",
              "type": "info"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "d266e7126d6045518d77fa50791c2b48": {
        "action_id": "d266e7126d6045518d77fa50791c2b48",
        "trigger": "button_click",
        "target_component_id": "nav_dashboard_link",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "navigate",
            "config": {
              "path": "/admin"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "14101dd46e2d43f295bcfe74ab6318d2": {
        "action_id": "14101dd46e2d43f295bcfe74ab6318d2",
        "trigger": "button_click",
        "target_component_id": "nav_users_link",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "navigate",
            "config": {
              "path": "/admin/users"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "2d14a62bb53e499396c137e1fb3f1b5b": {
        "action_id": "2d14a62bb53e499396c137e1fb3f1b5b",
        "trigger": "button_click",
        "target_component_id": "nav_categories_link",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "navigate",
            "config": {
              "path": "/admin/categories"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      }
    },
    "feedback": {
      "442ecd3ff5b144b7918b777996adff7e": {
        "action_id": "442ecd3ff5b144b7918b777996adff7e",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": null,
        "error_message": "Failed to load audit logs. Please try again.",
        "ui_updates": [
          "state.loading = false"
        ]
      },
      "866a0bb643e747e287b54604e71400a8": {
        "action_id": "866a0bb643e747e287b54604e71400a8",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": null,
        "error_message": "Failed to load log details.",
        "ui_updates": []
      },
      "efddfafa35e240e0b205a9f76db36f11": {
        "action_id": "efddfafa35e240e0b205a9f76db36f11",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Export completed successfully",
        "error_message": "Failed to export audit logs",
        "ui_updates": [
          "state.exportLoading = false"
        ]
      },
      "d41fe0ae29994153a229a85068c824d4": {
        "action_id": "d41fe0ae29994153a229a85068c824d4",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "d266e7126d6045518d77fa50791c2b48": {
        "action_id": "d266e7126d6045518d77fa50791c2b48",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "14101dd46e2d43f295bcfe74ab6318d2": {
        "action_id": "14101dd46e2d43f295bcfe74ab6318d2",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "2d14a62bb53e499396c137e1fb3f1b5b": {
        "action_id": "2d14a62bb53e499396c137e1fb3f1b5b",
        "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": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "minHeight": "100vh",
          "width": "100%",
          "display": "flex",
          "flexDirection": "column",
          "backgroundColor": "#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_section": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "display": "flex",
          "justifyContent": "space-between",
          "alignItems": "center",
          "marginBottom": "16px",
          "flexWrap": "wrap",
          "gap": "12px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "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",
          "flexDirection": "column",
          "gap": "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_title": {
        "type": "Typography.Title",
        "label": "Audit Logs",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "level": 2,
          "children": "Audit Logs"
        },
        "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
      },
      "page_breadcrumb": {
        "type": "Breadcrumb",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "items": [
            {
              "title": "Admin",
              "href": "/admin"
            },
            {
              "title": "Audit Logs"
            }
          ]
        },
        "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
      },
      "header_actions": {
        "type": "Space",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "size": "middle"
        },
        "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
      },
      "export_button": {
        "type": "Button",
        "label": "Export CSV",
        "description": null,
        "bind": null,
        "onClick": "exportCsv",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "icon": "DownloadOutlined",
          "loading": "$state.exportLoading",
          "children": "Export CSV"
        },
        "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
      },
      "admin_nav_section": {
        "type": "Space",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "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
      },
      "nav_dashboard_link": {
        "type": "Button",
        "label": "Dashboard",
        "description": null,
        "bind": null,
        "onClick": "navigateToDashboard",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "link",
          "children": "Dashboard"
        },
        "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_users_link": {
        "type": "Button",
        "label": "Users",
        "description": null,
        "bind": null,
        "onClick": "navigateToUsers",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "link",
          "children": "Users"
        },
        "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_categories_link": {
        "type": "Button",
        "label": "Categories",
        "description": null,
        "bind": null,
        "onClick": "navigateToCategories",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "link",
          "children": "Categories"
        },
        "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_audit_logs_link": {
        "type": "Button",
        "label": "Audit Logs",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "link",
          "disabled": true,
          "children": "Audit Logs"
        },
        "dynamic_props": {},
        "styles": {
          "fontWeight": "bold"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "retention_notice": {
        "type": "Alert",
        "label": "Retention Notice",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "info",
          "showIcon": true,
          "message": "Data Retention Policy",
          "description": "Audit logs are retained for a minimum of 90 days in compliance with system data retention policies. Logs older than the retention period may be automatically archived.",
          "closable": 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_card": {
        "type": "Card",
        "label": "Filters",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Filters",
          "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
      },
      "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",
          "flexWrap": "wrap",
          "gap": "12px",
          "alignItems": "flex-end"
        },
        "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_filter": {
        "type": "DatePicker.RangePicker",
        "label": "Date Range",
        "description": null,
        "bind": "state.filterDateRange",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": [
            "Start Date",
            "End Date"
          ],
          "allowClear": true,
          "format": "YYYY-MM-DD",
          "onChange": "onDateRangeChange"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "240px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "user_search_filter": {
        "type": "Input.Search",
        "label": "User Search",
        "description": null,
        "bind": "state.filterUserSearch",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Search by user ID...",
          "allowClear": true,
          "onSearch": "onUserSearchChange",
          "onChange": "onUserSearchChange"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "200px",
          "maxWidth": "280px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "action_type_filter": {
        "type": "Select",
        "label": "Action Type",
        "description": null,
        "bind": "state.filterAction",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Filter by action",
          "allowClear": true,
          "onChange": "onActionFilterChange",
          "options": [
            {
              "label": "Create",
              "value": "CREATE"
            },
            {
              "label": "Update",
              "value": "UPDATE"
            },
            {
              "label": "Delete",
              "value": "DELETE"
            },
            {
              "label": "Login",
              "value": "LOGIN"
            },
            {
              "label": "Logout",
              "value": "LOGOUT"
            },
            {
              "label": "Calculate",
              "value": "CALCULATE"
            },
            {
              "label": "Export",
              "value": "EXPORT"
            },
            {
              "label": "Disable",
              "value": "DISABLE"
            },
            {
              "label": "Enable",
              "value": "ENABLE"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "180px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "entity_type_filter": {
        "type": "Select",
        "label": "Entity Type",
        "description": null,
        "bind": "state.filterEntityType",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Filter by entity type",
          "allowClear": true,
          "onChange": "onEntityTypeFilterChange",
          "options": [
            {
              "label": "User",
              "value": "User"
            },
            {
              "label": "BMI Calculation",
              "value": "BmiCalculation"
            },
            {
              "label": "BMI Category",
              "value": "BmiCategory"
            },
            {
              "label": "Goal",
              "value": "Goal"
            },
            {
              "label": "Profile",
              "value": "Profile"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "180px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "filter_buttons": {
        "type": "Space",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "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
      },
      "filter_apply_button": {
        "type": "Button",
        "label": "Apply Filters",
        "description": null,
        "bind": null,
        "onClick": "loadAuditLogs",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "icon": "SearchOutlined",
          "children": "Apply"
        },
        "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
      },
      "clear_filters_button": {
        "type": "Button",
        "label": "Clear Filters",
        "description": null,
        "bind": null,
        "onClick": "clearFilters",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "default",
          "children": "Clear"
        },
        "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
      },
      "table_card": {
        "type": "Card",
        "label": "Audit Logs Table",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "bodyStyle": {
            "padding": 0
          }
        },
        "dynamic_props": {},
        "styles": {
          "flex": 1
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "audit_logs_table": {
        "type": "Table",
        "label": "Audit Logs",
        "description": null,
        "bind": "state.auditLogs",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "rowKey": "id",
          "loading": "$state.loading",
          "scroll": {
            "x": 1200
          },
          "size": "middle",
          "pagination": {
            "current": "$state.currentPage",
            "pageSize": "$state.pageSize",
            "total": "$state.totalCount",
            "showSizeChanger": true,
            "showQuickJumper": true,
            "showTotal": "total => `Total ${total} log entries`",
            "pageSizeOptions": [
              "10",
              "20",
              "50",
              "100"
            ],
            "onChange": "onPageChange"
          },
          "columns": [
            {
              "title": "Timestamp",
              "dataIndex": "timestamp",
              "key": "timestamp",
              "sorter": true,
              "defaultSortOrder": "descend",
              "width": 180,
              "render": "datetime"
            },
            {
              "title": "User",
              "dataIndex": "user_id",
              "key": "user_id",
              "width": 160,
              "render": "user_id || 'System'"
            },
            {
              "title": "Action",
              "dataIndex": "action",
              "key": "action",
              "width": 120,
              "render": "tag"
            },
            {
              "title": "Entity Type",
              "dataIndex": "entity_type",
              "key": "entity_type",
              "width": 140
            },
            {
              "title": "Entity ID",
              "dataIndex": "entity_id",
              "key": "entity_id",
              "width": 160,
              "ellipsis": true
            },
            {
              "title": "IP Address",
              "dataIndex": "ip_address",
              "key": "ip_address",
              "width": 130
            },
            {
              "title": "Details",
              "dataIndex": "details",
              "key": "details",
              "width": 200,
              "ellipsis": true,
              "render": "truncated_json"
            },
            {
              "title": "Actions",
              "key": "row_actions",
              "width": 80,
              "fixed": "right",
              "render": "view_detail_button"
            }
          ],
          "onChange": "onSortChange",
          "expandable": {
            "expandedRowKeys": "$state.expandedRowKeys",
            "onExpandedRowsChange": "onExpandRow",
            "expandedRowRender": "record => JSON.stringify(record.details, null, 2)"
          }
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "detail_modal": {
        "type": "Modal",
        "label": "Log Detail",
        "description": null,
        "bind": "state.detailModalVisible",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Audit Log Details",
          "open": "$state.detailModalVisible",
          "onCancel": "onCloseDetailModal",
          "footer": null,
          "width": 640
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "detail_descriptions": {
        "type": "Descriptions",
        "label": "Log Details",
        "description": null,
        "bind": "state.selectedLog",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "bordered": true,
          "column": 1,
          "size": "small",
          "items": [
            {
              "label": "Log ID",
              "field": "log_id"
            },
            {
              "label": "Timestamp",
              "field": "timestamp"
            },
            {
              "label": "User",
              "field": "user_first_name,user_last_name"
            },
            {
              "label": "User ID",
              "field": "user_id"
            },
            {
              "label": "Action",
              "field": "action"
            },
            {
              "label": "Entity Type",
              "field": "entity_type"
            },
            {
              "label": "Entity ID",
              "field": "entity_id"
            },
            {
              "label": "IP Address",
              "field": "ip_address"
            },
            {
              "label": "User Agent",
              "field": "user_agent"
            },
            {
              "label": "Details",
              "field": "details",
              "render": "json"
            }
          ]
        },
        "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": [
        "admin_nav_section",
        "page_header_section",
        "retention_notice",
        "filters_card",
        "table_card",
        "detail_modal"
      ],
      "admin_nav_section": [
        "nav_dashboard_link",
        "nav_users_link",
        "nav_categories_link",
        "nav_audit_logs_link"
      ],
      "page_header_section": [
        "header_left",
        "header_actions"
      ],
      "header_left": [
        "page_breadcrumb",
        "page_title"
      ],
      "header_actions": [
        "export_button"
      ],
      "filters_card": [
        "filters_row"
      ],
      "filters_row": [
        "date_range_filter",
        "user_search_filter",
        "action_type_filter",
        "entity_type_filter",
        "filter_buttons"
      ],
      "filter_buttons": [
        "filter_apply_button",
        "clear_filters_button"
      ],
      "table_card": [
        "audit_logs_table"
      ],
      "detail_modal": [
        "detail_descriptions"
      ]
    },
    "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
      },
      "admin_nav_section": {
        "type": "horizontal",
        "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
      },
      "page_header_section": {
        "type": "horizontal",
        "gap": 16,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "header_left": {
        "type": "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
      },
      "header_actions": {
        "type": "horizontal",
        "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
      },
      "filters_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
      },
      "filters_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
      },
      "filter_buttons": {
        "type": "horizontal",
        "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
      },
      "table_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
      },
      "detail_modal": {
        "type": "vertical",
        "gap": 16,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      }
    },
    "layout_zones": [
      {
        "zone_id": "main_zone",
        "component": "main_container",
        "anchor": "top-left",
        "size_hint": "full-width",
        "z_layer": "base",
        "notes": "Root page container with full viewport height"
      },
      {
        "zone_id": "modal_zone",
        "component": "detail_modal",
        "anchor": "center",
        "size_hint": "auto",
        "z_layer": "overlay",
        "notes": "Detail modal overlay for viewing full log entry"
      }
    ],
    "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
}
