export type ServiceCategory =
  | "sites"
  | "landing"
  | "ecommerce"
  | "manutencao"
  | "hospedagem"
  | "email"
  | "pacotes";

export type Service = {
  id: string;
  name: string;
  category: ServiceCategory;
  shortDescription: string;
  deliverables: string[];
  basePrice: number;
  recurring: "mensal" | "anual" | null;
  defaultDeadlineDays: number;
  active: boolean;
};

export type Client = {
  id: string;
  name: string;
  tradeName?: string;
  document?: string;
  email?: string;
  phone?: string;
  city?: string;
};

export type ProposalStatus = "rascunho" | "enviada" | "aprovada" | "expirada";

export type ProposalSummary = {
  id: string;
  slug: string;
  number: string;
  clientId: string;
  clientName: string;
  title: string;
  total: number;
  recurringTotal?: number;
  status: ProposalStatus;
  validUntil: string;
  createdAt: string;
};

export type PaymentMethod = "pix" | "boleto" | "cartao";

export type ProposalItemDetail = {
  serviceId: string;
  name: string;
  unitPrice: number;
  quantity: number;
  recurring: "mensal" | "anual" | null;
};

export type ProposalDetail = {
  id: string;
  contactName: string;
  email: string;
  whatsapp: string;
  website?: string;
  items: ProposalItemDetail[];
  scope: string;
  deliverables: string[];
  observations?: string;
  deadlineDays: number;
  /**
   * Forma de pagamento principal (compat. com propostas antigas).
   * Quando houver múltiplas, equivale a `paymentMethods[0]`.
   */
  paymentMethod: PaymentMethod;
  /** Lista completa de formas de pagamento aceitas. */
  paymentMethods?: PaymentMethod[];
  installments: number;
};
