import { Ref, ComputedRef } from 'vue'; import { GraphQLClient, Company, Cart, CartMainItem, Contact, Customer, PurchaseAuthorizationConfig, PurchaseAuthorizationConfigCreateInput, RegisterContactInput } from '@propeller-commerce/propeller-sdk-v2'; export interface RowEdit { role: string; limit: number | undefined; dirty: boolean; } export interface AddContactFormState { gender: string; email: string; firstName: string; middleName: string; lastName: string; phone: string; } export interface UsePurchaseAuthorizationConfiguratorOptions { graphqlClient: GraphQLClient; user: Ref; companyId: Ref; /** Rows per page (default 10) */ pageOffset?: number; beforeContactCreate?: (input: RegisterContactInput) => void; onContactCreate?: (input: RegisterContactInput) => void; afterContactCreate?: (contact: Contact) => void; onPurchaseAuthorizationCreate?: (pac: PurchaseAuthorizationConfigCreateInput) => void; afterPurchaseAuthorizationCreate?: (pac: PurchaseAuthorizationConfig) => void; onPurchaseAuthorizationUpdate?: (pac: PurchaseAuthorizationConfig) => void; afterPurchaseAuthorizationUpdate?: (pac: PurchaseAuthorizationConfig) => void; onPurchaseAuthorizationDelete?: (pac: PurchaseAuthorizationConfig) => void; afterPurchaseAuthorizationDelete?: (deleted: boolean) => void; } export interface UsePurchaseAuthorizationConfiguratorReturn { company: Ref; loading: Ref; contacts: ComputedRef; totalPages: ComputedRef; currentPage: Ref; isAuthManager: ComputedRef; rowEdits: Ref>; pacMap: Ref>; actionLoading: Ref>; showAddContactModal: Ref; addContactForm: Ref; addContactLoading: Ref; addContactError: Ref; hasPac: (contactId: number) => boolean; isCurrentUser: (contactId: number) => boolean; isRowDirty: (contactId: number) => boolean; getRowRole: (contactId: number) => string; getRowLimit: (contactId: number) => number | undefined; isRowLoading: (contactId: number) => boolean; loadCompany: (page: number) => Promise; handleRoleChange: (contactId: number, role: string) => void; handleLimitChange: (contactId: number, value: string) => void; handleCreate: (contactId: number) => Promise; handleSave: (contactId: number) => Promise; handleDelete: (contactId: number) => Promise; handlePageChange: (page: number) => void; openAddContactModal: () => void; closeAddContactModal: () => void; handleAddContactSubmit: () => Promise; } export declare function usePurchaseAuthorizationConfigurator(options: UsePurchaseAuthorizationConfiguratorOptions): UsePurchaseAuthorizationConfiguratorReturn; export interface UsePurchaseAuthorizationRequestsOptions { graphqlClient: GraphQLClient; user: Ref; companyId: Ref; configuration?: { language?: string; imageSearchFiltersGrid?: any; imageVariantFiltersSmall?: any; }; onAcceptRequest?: (cartId: string) => void; afterAcceptRequest?: (cart: Cart) => void; /** * Called BEFORE deleting; receives the cart id. Lets the host short-circuit * the SDK call and run its own deletion logic, following the same pattern as * onAcceptRequest. */ onDeleteRequest?: (cartId: string) => void; /** Called AFTER a successful delete. Receives the deleted cart's id. */ afterDeleteRequest?: (cartId: string) => void; onError?: (err: Error) => void; } export interface UsePurchaseAuthorizationRequestsReturn { carts: Ref; loading: Ref; selectedCart: Ref; modalLoading: Ref; acceptLoading: Ref; deleteLoading: Ref; isAuthManager: ComputedRef; getTotalQuantity: (cart: Cart) => number; getContactName: (contact: Contact | null | undefined) => string; getModalItems: () => CartMainItem[]; loadCarts: () => Promise; handleViewCart: (cart: Cart) => Promise; handleAcceptRequest: () => Promise; handleDeleteRequest: () => Promise; closeModal: () => void; } export declare function usePurchaseAuthorizationRequests(options: UsePurchaseAuthorizationRequestsOptions): UsePurchaseAuthorizationRequestsReturn;