import type { Product, Category, Supplier, Customer, Sale, Purchase, Plan, Company } from "@/types";

export const categories: Category[] = [
  { id: "c1", name: "Abarrotes", active: true },
  { id: "c2", name: "Lácteos", active: true },
  { id: "c3", name: "Bebidas", active: true },
  { id: "c4", name: "Limpieza", active: true },
  { id: "c5", name: "Cuidado Personal", active: true },
  { id: "c6", name: "Frutas y Verduras", active: true },
  { id: "c7", name: "Snacks", active: true },
  { id: "c8", name: "Panadería", active: true },
];

export const products: Product[] = [
  {
    id: "p1",
    name: "Arroz Costeño 750g",
    category: "Abarrotes",
    barcode: "7750001000011",
    cost: 3.2,
    price: 4.5,
    stock: 48,
    unit: "und",
    image: "/img/products/p1.png",
  },
  {
    id: "p2",
    name: "Azúcar Rubia 1kg",
    category: "Abarrotes",
    barcode: "7750001000028",
    cost: 3.8,
    price: 5.2,
    stock: 32,
    unit: "kg",
  },
  {
    id: "p3",
    name: "Aceite Primor 1L",
    category: "Abarrotes",
    barcode: "7750001000035",
    cost: 7.5,
    price: 9.9,
    stock: 18,
    unit: "und",
  },
  {
    id: "p4",
    name: "Fideos Don Vittorio 500g",
    category: "Abarrotes",
    barcode: "7750001000042",
    cost: 2.5,
    price: 3.8,
    stock: 60,
    unit: "und",
  },
  {
    id: "p5",
    name: "Atún Florida",
    category: "Abarrotes",
    barcode: "7750001000059",
    cost: 4.2,
    price: 5.9,
    stock: 25,
    unit: "und",
  },
  {
    id: "p6",
    name: "Leche Gloria 400g",
    category: "Lácteos",
    barcode: "7750001000066",
    cost: 3.0,
    price: 4.2,
    stock: 40,
    unit: "und",
  },
  {
    id: "p7",
    name: "Yogurt Gloria 1L",
    category: "Lácteos",
    barcode: "7750001000073",
    cost: 5.5,
    price: 7.5,
    stock: 15,
    unit: "und",
  },
  {
    id: "p8",
    name: "Coca Cola 1.5L",
    category: "Bebidas",
    barcode: "7750001000080",
    cost: 5.0,
    price: 7.0,
    stock: 30,
    unit: "und",
    image: "/img/products/p8.png",
  },
  {
    id: "p9",
    name: "Inca Kola 1.5L",
    category: "Bebidas",
    barcode: "7750001000097",
    cost: 5.0,
    price: 7.0,
    stock: 28,
    unit: "und",
  },
  {
    id: "p10",
    name: "Agua San Luis",
    category: "Bebidas",
    barcode: "7750001000103",
    cost: 1.2,
    price: 2.0,
    stock: 80,
    unit: "und",
  },
  {
    id: "p11",
    name: "Detergente Bolívar",
    category: "Limpieza",
    barcode: "7750001000110",
    cost: 8.0,
    price: 11.5,
    stock: 12,
    unit: "und",
  },
  {
    id: "p12",
    name: "Papel Higiénico",
    category: "Limpieza",
    barcode: "7750001000127",
    cost: 6.5,
    price: 9.5,
    stock: 22,
    unit: "paq",
  },
  {
    id: "p13",
    name: "Shampoo",
    category: "Cuidado Personal",
    barcode: "7750001000134",
    cost: 9.0,
    price: 13.5,
    stock: 8,
    unit: "und",
  },
  {
    id: "p14",
    name: "Pasta Dental",
    category: "Cuidado Personal",
    barcode: "7750001000141",
    cost: 4.0,
    price: 6.5,
    stock: 3,
    unit: "und",
  },
  {
    id: "p15",
    name: "Plátano kg",
    category: "Frutas y Verduras",
    barcode: "7750001000158",
    cost: 1.5,
    price: 2.8,
    stock: 25,
    unit: "kg",
    image: "/img/products/p15.png",
  },
  {
    id: "p16",
    name: "Tomate kg",
    category: "Frutas y Verduras",
    barcode: "7750001000165",
    cost: 2.5,
    price: 4.0,
    stock: 0,
    unit: "kg",
  },
  {
    id: "p17",
    name: "Papas Lays",
    category: "Snacks",
    barcode: "7750001000172",
    cost: 2.5,
    price: 4.0,
    stock: 35,
    unit: "und",
  },
  {
    id: "p18",
    name: "Galletas Oreo",
    category: "Snacks",
    barcode: "7750001000189",
    cost: 1.8,
    price: 2.8,
    stock: 50,
    unit: "und",
  },
  {
    id: "p19",
    name: "Pan Francés",
    category: "Panadería",
    barcode: "7750001000196",
    cost: 0.2,
    price: 0.5,
    stock: 120,
    unit: "und",
  },
];

export const suppliers: Supplier[] = [
  { id: "s1", name: "Distribuidora Andina", ruc: "20512345678", phone: "987654321" },
  { id: "s2", name: "Alimentos del Sur", ruc: "20598765432", phone: "987111222" },
  { id: "s3", name: "Bebidas Perú", ruc: "20587654321", phone: "987333444" },
];

export const customers: Customer[] = [
  { id: "cl0", name: "Público general", doc: "-", phone: "-" },
  { id: "cl1", name: "María López", doc: "45678912", phone: "987654001" },
  { id: "cl2", name: "Juan Pérez", doc: "12345678", phone: "987654002" },
  { id: "cl3", name: "Ana Torres", doc: "78912345", phone: "987654003" },
  { id: "cl4", name: "Luis García", doc: "32165498", phone: "987654004" },
];

export const sales: Sale[] = [
  {
    id: "V-0001",
    date: "2025-06-15",
    type: "Boleta",
    method: "Efectivo",
    customer: "Público general",
    items: [
      { productId: "p1", name: "Arroz Costeño 750g", qty: 2, price: 4.5 },
      { productId: "p6", name: "Leche Gloria 400g", qty: 3, price: 4.2 },
    ],
    subtotal: 18.31,
    igv: 3.29,
    total: 21.6,
  },
  {
    id: "V-0002",
    date: "2025-06-16",
    type: "Ticket",
    method: "Yape",
    customer: "María López",
    items: [{ productId: "p8", name: "Coca Cola 1.5L", qty: 1, price: 7.0 }],
    subtotal: 5.93,
    igv: 1.07,
    total: 7.0,
  },
  {
    id: "V-0003",
    date: "2025-06-17",
    type: "Factura",
    method: "Tarjeta",
    customer: "Juan Pérez",
    items: [
      { productId: "p3", name: "Aceite Primor 1L", qty: 2, price: 9.9 },
      { productId: "p11", name: "Detergente Bolívar", qty: 1, price: 11.5 },
    ],
    subtotal: 26.53,
    igv: 4.77,
    total: 31.3,
  },
];

export const purchases: Purchase[] = [
  {
    id: "C-0001",
    date: "2025-06-10",
    supplier: "Distribuidora Andina",
    doc: "F001-1023",
    total: 1250.5,
  },
  { id: "C-0002", date: "2025-06-12", supplier: "Bebidas Perú", doc: "F001-0584", total: 890.0 },
  {
    id: "C-0003",
    date: "2025-06-14",
    supplier: "Alimentos del Sur",
    doc: "F002-0212",
    total: 540.7,
  },
];

export const plans: Plan[] = [
  { id: "pl1", name: "Prueba", price: 0, products: 50, users: 1, sales: 100, active: 12 },
  { id: "pl2", name: "Básico", price: 17, products: 300, users: 3, sales: 1000, active: 45 },
  { id: "pl3", name: "Pro", price: 37, products: 3000, users: 10, sales: 4000, active: 23 },
];

export const companies: Company[] = [
  {
    id: "e1",
    name: "Tienda Demo",
    ruc: "20100000001",
    plan: "Pro",
    users: 4,
    expires: "2025-12-31",
    status: "Activa",
  },
  {
    id: "e2",
    name: "Bodega San José",
    ruc: "20100000002",
    plan: "Básico",
    users: 2,
    expires: "2025-07-30",
    status: "Activa",
  },
  {
    id: "e3",
    name: "Market Express",
    ruc: "20100000003",
    plan: "Prueba",
    users: 1,
    expires: "2025-06-25",
    status: "Trial",
  },
  {
    id: "e4",
    name: "Tienda La Esquina",
    ruc: "20100000004",
    plan: "Básico",
    users: 2,
    expires: "2025-05-20",
    status: "Vencida",
  },
];

// Chart data
export const salesLast7Days = [
  { day: "Lun", total: 320 },
  { day: "Mar", total: 410 },
  { day: "Mié", total: 380 },
  { day: "Jue", total: 520 },
  { day: "Vie", total: 610 },
  { day: "Sáb", total: 780 },
  { day: "Dom", total: 450 },
];
export const salesByCategory = [
  { name: "Abarrotes", value: 1200 },
  { name: "Bebidas", value: 850 },
  { name: "Lácteos", value: 520 },
  { name: "Snacks", value: 410 },
  { name: "Limpieza", value: 320 },
];
export const salesByMethod = [
  { name: "Efectivo", value: 1800 },
  { name: "Yape", value: 950 },
  { name: "Tarjeta", value: 620 },
  { name: "Plin", value: 230 },
];
