import { FileSpreadsheet, Plus } from "lucide-react";

import { DropdownAction } from "@/components/ui/rhfFields/ButtonDropDown";
import { BulkUploadDialog } from "./BullkUpload";
import { ManualBulk } from "./ManualUpload";
import { Unit } from "@/types/project";
export const uploadOptions: DropdownAction[] = [
  {
    label: "Bulk Upload Excel",
    value: "bulk",
    icon: FileSpreadsheet,
  },
  {
    label: "Add Manually",
    value: "manual",
    icon: Plus,
  },
];

export const unitDialogs = [
  {
    type: "bulk",
    title: "Bulk Upload Units",
    description:
      "Upload an Excel file with unit details. Please use the template format.",
    width: "500px",
    Component: BulkUploadDialog,
  },
  {
    type: "manual",
    title: "Add New Unit",
    description: "Enter the details for the new unit.",
    width: "500px",
    Component: ManualBulk,
  },
] as const;

// TODO: can remove later when integrating API

export const statsData = {
  totalUnits: 31,
  soldUnits: 14,
  holdUnits: 12,
  availableUnits: 17,
  totalSalesValue: 415567564,
  totalReceived: 240983876,
  totalDue: 174583688,
  receivedPercentage: 58,
  duePercentage: 42,
};

export const unitsData: Unit[] = [
  {
    id: 1,
    unitNo: "A-101",
    unitType: "Residential",
    size: 1250,
    status: "Sold",
    price: 7500000,
    soldAt: 7650000,
    soldRate: 6120,
    customerName: "Rajesh Sharma",
    soldBy: "Priya Patel",
    salesDate: "15/02/2023",
    paymentReceived: 6500000,
    paymentDue: 1150000,
  },
  {
    id: 2,
    unitNo: "A-102",
    unitType: "Residential",
    size: 1250,
    status: "Available",
    price: 7500000,
    soldAt: 21344,
    soldRate: null,
    customerName: null,
    soldBy: null,
    salesDate: null,
    paymentReceived: 234532,
    paymentDue: 32343521,
  },
  {
    id: 3,
    unitNo: "A-103",
    unitType: "Residential",
    size: 1450,
    status: "Sold",
    price: 8700000,
    soldAt: 8500000,
    soldRate: 5862,
    customerName: "Ananya Gupta",
    soldBy: "Vikram Singh",
    salesDate: "22/03/2023",
    paymentReceived: 8500000,
    paymentDue: 0,
  },
  {
    id: 4,
    unitNo: "A-104",
    unitType: "Residential",
    size: 1450,
    status: "Hold",
    price: 8700000,
    soldAt: 21343321,
    soldRate: null,
    customerName: "Suresh Kumar",
    soldBy: "Deepak Verma",
    salesDate: "05/04/2023",
    paymentReceived: 870000,
    paymentDue: 7830000,
  },
  {
    id: 5,

    unitNo: "B-201",
    unitType: "Commercial",
    size: 1850,
    status: "Sold",
    price: 11100000,
    soldAt: 11000000,
    soldRate: 5946,
    customerName: "Neha Reddy",
    soldBy: "Priya Patel",
    salesDate: "10/01/2023",
    paymentReceived: 9900000,
    paymentDue: 1100000,
  },
  {
    id: 6,

    unitNo: "B-202",
    unitType: "Commercial",
    size: 1850,
    status: "Available",
    price: 11100000,
    soldAt: 234321,
    soldRate: null,
    customerName: null,
    soldBy: null,
    salesDate: null,
    paymentReceived: 345321,
    paymentDue: 4544321,
  },
  {
    id: 7,

    unitNo: "B-203",
    unitType: "Commercial",
    size: 2100,
    status: "Sold",
    price: 12600000,
    soldAt: 12800000,
    soldRate: 6095,
    customerName: "Arjun Nair",
    soldBy: "Vikram Singh",
    salesDate: "18/02/2023",
    paymentReceived: 10240000,
    paymentDue: 2560000,
  },
  {
    id: 8,

    unitNo: "B-204",
    unitType: "Commercial",
    size: 2100,
    status: "Available",
    price: 12600000,
    soldAt: 234324,
    soldRate: null,
    customerName: null,
    soldBy: null,
    salesDate: null,
    paymentReceived: 124321,
    paymentDue: 211234321,
  },
  {
    id: 9,

    unitNo: "P-01",
    unitType: "Parking Space",
    size: 150,
    status: "Sold",
    price: 500000,
    soldAt: 550000,
    soldRate: 3667,
    customerName: "Kiran Joshi",
    soldBy: "Deepak Verma",
    salesDate: "05/03/2023",
    paymentReceived: 550000,
    paymentDue: 0,
  },
  {
    id: 10,

    unitNo: "P-02",
    unitType: "Parking Space",
    size: 150,
    status: "Available",
    price: 500000,
    soldAt: 234332,
    soldRate: null,
    customerName: null,
    soldBy: null,
    salesDate: null,
    paymentReceived: 4542334,
    paymentDue: 5432345,
  },
];

export enum TimelineStatus {
  COMPLETE = "complete",
  IN_PROGRESS = "in_progress",
  DELAYED = "delayed",
  NOT_STARTED = "not_started",
}
