import { queryOptions } from '@tanstack/react-query';
import { getQuotationDocumentData, getQuotationDocumentPreview } from './service';

export const quotationDocumentKeys = {
  all: ['crm-quotation-document'] as const,
  data: (id: string) => [...quotationDocumentKeys.all, 'data', id] as const,
  preview: (id: string) => [...quotationDocumentKeys.all, 'preview', id] as const
};

export const quotationDocumentDataOptions = (id: string) =>
  queryOptions({
    queryKey: quotationDocumentKeys.data(id),
    queryFn: () => getQuotationDocumentData(id)
  });

export const quotationDocumentPreviewOptions = (id: string) =>
  queryOptions({
    queryKey: quotationDocumentKeys.preview(id),
    queryFn: () => getQuotationDocumentPreview(id)
  });
