// frontendConfig.js
export const frontendConfig = {
  appName: "StockFlow Control Hub",
  // ✅ UPDATED: Added Dashboard as the primary interface element
  menuItems: ["Dashboard", "Suppliers", "Products", "StockInbound", "SalesOrder", "Reports"],
  structures: {
    // ✅ ADDED: Structural layout specifications for Dashboard routing references
    Dashboard: {
      title: "System Overview Dashboard",
      pk: "DashboardID",
      fields: []
    },
    Suppliers: {
      title: "Vendor & Supplier Profiles",
      pk: "SupplierCode",
      fields: [
        { key: "SupplierCode", label: "Supplier Code (Unique Key)", type: "text" },
        { key: "SupplierName", label: "Official Vendor/Company Name", type: "text" },
        { key: "ContactPerson", label: "Account Management Liaison Person", type: "text" },
        { key: "SupplierPhone", label: "Active Vendor Contact Number", type: "text" },
        { key: "SupplierEmail", label: "Corporate Business Email Address", type: "text" }
      ]
    },
    Products: {
      title: "Master Inventory Stock Matrix",
      pk: "ProductCode",
      fields: [
        { key: "ProductCode", label: "Product SKU / Identification Code", type: "text" },
        { key: "ProductName", label: "Official Inventory Item Name", type: "text" },
        { key: "Category", label: "Inventory Classification Category", type: "text" },
        { key: "UnitPrice", label: "Base Valuation Unit Price (Rwf)", type: "number" },
        { key: "CurrentStock", label: "Total Quantities Currently On Hand", type: "number" },
        { key: "MinimumRequiredStock", label: "Safety Stock Limit Threshold Trigger", type: "number" }
      ]
    },
    StockInbound: {
      title: "Procured Inbound Batch Restocks",
      pk: "BatchNumber",
      fields: [
        { key: "ProductCode", label: "Target Procured Product SKU", type: "select", relation: "Products", valueField: "ProductCode", displayField: "ProductName" },
        { key: "SupplierCode", label: "Providing Source Distribution Vendor", type: "select", relation: "Suppliers", valueField: "SupplierCode", displayField: "SupplierName" },
        { key: "QuantityReceived", label: "Total Inventory Units Supplied", type: "number" },
        { key: "InboundDate", label: "Operations Warehouse Intake Date", type: "date" }
      ]
    },
    SalesOrder: {
      title: "Dispatched Commercial Invoices",
      pk: "InvoiceNumber",
      fields: [
        { key: "BatchNumber", label: "Select Verified Open Supply Batch Item", type: "select", relation: "StockInbound", valueField: "BatchNumber", displayField: "BatchNumber" },
        { key: "QuantitySold", label: "Total Order Item Volume Dispatched", type: "number" },
        { key: "TotalCostAmount", label: "Settled Transaction Revenue Value (Rwf)", type: "number" },
        { key: "SalesDate", label: "Transaction Settlement Fulfillment Date", type: "date" }
      ]
    },
    Reports: {
      title: "Performance Metrics & Analytics Intelligence",
      pk: "ReportID",
      fields: [
        { key: "ProductCode", label: "Target Analytical Product SKU", type: "select", relation: "Products", valueField: "ProductCode", displayField: "ProductName" },
        { key: "TotalInboundUnits", label: "Cumulative Volume Received To Date", type: "number" },
        { key: "TotalOutboundUnits", label: "Cumulative Volume Sold To Date", type: "number" },
        { key: "NetRevenueGenerated", label: "Financial Pipeline Balance Revenue (Rwf)", type: "number" }
      ]
    }
  }
};