import { A as SetNameAction, D as Reducer, E as RedoAction, M as UndoAction, N as UpgradeManifest, S as PHDocument, _ as NOOPAction, b as PHAuthState, j as SignalDispatch, k as SchemaPruneAction, l as DocumentModelUtils, m as LoadStateAction, o as DocumentModelGlobalState, r as PHDocumentController, t as ActionMap, w as PHDocumentState, x as PHBaseState } from "../../index-BWXRiGBX.js";
import { a as ZodString, c as $strip, i as ZodObject, n as ZodEnum, o as ZodType, r as ZodLiteral, s as $ZodTypeInternals, t as ZodAny } from "../../schemas-CBgWAPtq.js";
import { t as DocumentDispatch } from "../../index-B72y5VYK.js";
import { A as Incremental, C as DeleteLineItemInput, D as EditLineItemTagInput, E as EditLineItemInput, F as Maybe, I as Scalars, M as MakeEmpty, N as MakeMaybe, O as EditStatusInput, P as MakeOptional, S as BillingStatementUnitInput, T as EditContributorInput, _ as BillingStatementState, a as BillingStatementLineItemsAction, b as BillingStatementTag, c as BillingStatementGeneralAction, d as EditStatusAction, f as BillingStatementDocument, g as BillingStatementLineItem, h as AddLineItemInput, i as AddLineItemAction, j as InputMaybe, k as Exact, l as EditBillingStatementAction, m as BillingStatementPHState, n as BillingStatementTagsAction, o as DeleteLineItemAction, p as BillingStatementLocalState, r as EditLineItemTagAction, s as EditLineItemAction, t as BillingStatementAction, u as EditContributorAction, v as BillingStatementStatus, w as EditBillingStatementInput, x as BillingStatementUnit, y as BillingStatementStatusInput } from "../../actions-P6q_fLge.js";

//#region document-models/billing-statement/v1/gen/document-model.d.ts
declare const documentModel: DocumentModelGlobalState;
declare namespace creators_d_exports {
  export { editBillingStatement, editContributor, editStatus };
}
declare const editBillingStatement: (input: EditBillingStatementInput) => EditBillingStatementAction;
declare const editContributor: (input: EditContributorInput) => EditContributorAction;
declare const editStatus: (input: EditStatusInput) => EditStatusAction;
declare namespace creators_d_exports$1 {
  export { addLineItem, deleteLineItem, editLineItem };
}
declare const addLineItem: (input: AddLineItemInput) => AddLineItemAction;
declare const editLineItem: (input: EditLineItemInput) => EditLineItemAction;
declare const deleteLineItem: (input: DeleteLineItemInput) => DeleteLineItemAction;
declare namespace creators_d_exports$2 {
  export { editLineItemTag };
}
declare const editLineItemTag: (input: EditLineItemTagInput) => EditLineItemTagAction;
//#endregion
//#region document-models/billing-statement/v1/gen/ph-factories.d.ts
declare function defaultGlobalState(): BillingStatementState;
declare function defaultLocalState(): BillingStatementLocalState;
declare function defaultPHState(): BillingStatementPHState;
declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<BillingStatementState>, localState?: Partial<BillingStatementLocalState>): BillingStatementPHState;
/**
 * Creates a BillingStatementDocument with custom global and local state
 * This properly handles the PHBaseState requirements while allowing
 * document-specific state to be set.
 */
declare function createBillingStatementDocument(state?: Partial<{
  auth?: Partial<PHAuthState>;
  document?: Partial<PHDocumentState>;
  global?: Partial<BillingStatementState>;
  local?: Partial<BillingStatementLocalState>;
}>): BillingStatementDocument;
//#endregion
//#region document-models/billing-statement/v1/gen/utils.d.ts
declare const initialGlobalState: BillingStatementState;
declare const initialLocalState: BillingStatementLocalState;
//#endregion
//#region document-models/billing-statement/v1/gen/reducer.d.ts
declare const reducer: Reducer<BillingStatementPHState>;
//#endregion
//#region document-models/billing-statement/v1/gen/controller.d.ts
declare const BillingStatementController: new (initialDocument?: PHDocument<BillingStatementPHState> | undefined) => PHDocumentController<BillingStatementPHState> & ActionMap<BillingStatementAction, PHDocumentController<BillingStatementPHState>>;
//#endregion
//#region document-models/billing-statement/v1/gen/schema/zod.d.ts
type Properties<T> = Required<{ [K in keyof T]: ZodType<T[K]> }>;
type definedNonNullAny = {};
declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
declare const definedNonNullAnySchema: ZodAny & ZodType<definedNonNullAny, any, $ZodTypeInternals<definedNonNullAny, any>>;
declare const BillingStatementStatusSchema: ZodEnum<{
  ACCEPTED: "ACCEPTED";
  DRAFT: "DRAFT";
  ISSUED: "ISSUED";
  PAID: "PAID";
  REJECTED: "REJECTED";
}>;
declare const BillingStatementStatusInputSchema: ZodEnum<{
  ACCEPTED: "ACCEPTED";
  DRAFT: "DRAFT";
  ISSUED: "ISSUED";
  PAID: "PAID";
  REJECTED: "REJECTED";
}>;
declare const BillingStatementUnitSchema: ZodEnum<{
  DAY: "DAY";
  HOUR: "HOUR";
  MINUTE: "MINUTE";
  UNIT: "UNIT";
}>;
declare const BillingStatementUnitInputSchema: ZodEnum<{
  DAY: "DAY";
  HOUR: "HOUR";
  MINUTE: "MINUTE";
  UNIT: "UNIT";
}>;
declare function AddLineItemInputSchema(): ZodObject<Properties<AddLineItemInput>>;
declare function BillingStatementLineItemSchema(): ZodObject<Properties<BillingStatementLineItem>>;
declare function BillingStatementStateSchema(): ZodObject<Properties<BillingStatementState>>;
declare function BillingStatementTagSchema(): ZodObject<Properties<BillingStatementTag>>;
declare function DeleteLineItemInputSchema(): ZodObject<Properties<DeleteLineItemInput>>;
declare function EditBillingStatementInputSchema(): ZodObject<Properties<EditBillingStatementInput>>;
declare function EditContributorInputSchema(): ZodObject<Properties<EditContributorInput>>;
declare function EditLineItemInputSchema(): ZodObject<Properties<EditLineItemInput>>;
declare function EditLineItemTagInputSchema(): ZodObject<Properties<EditLineItemTagInput>>;
declare function EditStatusInputSchema(): ZodObject<Properties<EditStatusInput>>;
//#endregion
//#region document-models/billing-statement/v1/gen/document-type.d.ts
declare const billingStatementDocumentType = "powerhouse/billing-statement";
//#endregion
//#region document-models/billing-statement/v1/gen/document-schema.d.ts
/** Schema for validating the header object of a BillingStatement document */
declare const BillingStatementDocumentHeaderSchema: ZodObject<{
  id: ZodString;
  name: ZodString;
  createdAtUtcIso: ZodString;
  lastModifiedAtUtcIso: ZodString;
  documentType: ZodLiteral<"powerhouse/billing-statement">;
}, $strip>;
/** Schema for validating the state object of a BillingStatement document */
declare const BillingStatementPHStateSchema: ZodObject<{
  global: ZodObject<Required<{
    contributor: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
    currency: ZodType<string, unknown, $ZodTypeInternals<string, unknown>>;
    dateDue: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
    dateIssued: ZodType<string, unknown, $ZodTypeInternals<string, unknown>>;
    lineItems: ZodType<BillingStatementLineItem[], unknown, $ZodTypeInternals<BillingStatementLineItem[], unknown>>;
    notes: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
    status: ZodType<BillingStatementStatus, unknown, $ZodTypeInternals<BillingStatementStatus, unknown>>;
    totalCash: ZodType<number, unknown, $ZodTypeInternals<number, unknown>>;
    totalPowt: ZodType<number, unknown, $ZodTypeInternals<number, unknown>>;
  }>, $strip>;
}, $strip>;
declare const BillingStatementDocumentSchema: ZodObject<{
  header: ZodObject<{
    id: ZodString;
    name: ZodString;
    createdAtUtcIso: ZodString;
    lastModifiedAtUtcIso: ZodString;
    documentType: ZodLiteral<"powerhouse/billing-statement">;
  }, $strip>;
  state: ZodObject<{
    global: ZodObject<Required<{
      contributor: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      currency: ZodType<string, unknown, $ZodTypeInternals<string, unknown>>;
      dateDue: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      dateIssued: ZodType<string, unknown, $ZodTypeInternals<string, unknown>>;
      lineItems: ZodType<BillingStatementLineItem[], unknown, $ZodTypeInternals<BillingStatementLineItem[], unknown>>;
      notes: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      status: ZodType<BillingStatementStatus, unknown, $ZodTypeInternals<BillingStatementStatus, unknown>>;
      totalCash: ZodType<number, unknown, $ZodTypeInternals<number, unknown>>;
      totalPowt: ZodType<number, unknown, $ZodTypeInternals<number, unknown>>;
    }>, $strip>;
  }, $strip>;
  initialState: ZodObject<{
    global: ZodObject<Required<{
      contributor: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      currency: ZodType<string, unknown, $ZodTypeInternals<string, unknown>>;
      dateDue: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      dateIssued: ZodType<string, unknown, $ZodTypeInternals<string, unknown>>;
      lineItems: ZodType<BillingStatementLineItem[], unknown, $ZodTypeInternals<BillingStatementLineItem[], unknown>>;
      notes: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      status: ZodType<BillingStatementStatus, unknown, $ZodTypeInternals<BillingStatementStatus, unknown>>;
      totalCash: ZodType<number, unknown, $ZodTypeInternals<number, unknown>>;
      totalPowt: ZodType<number, unknown, $ZodTypeInternals<number, unknown>>;
    }>, $strip>;
  }, $strip>;
}, $strip>;
/** Simple helper function to check if a state object is a BillingStatement document state object */
declare function isBillingStatementState(state: unknown): state is BillingStatementPHState;
/** Simple helper function to assert that a document state object is a BillingStatement document state object */
declare function assertIsBillingStatementState(state: unknown): asserts state is BillingStatementPHState;
/** Simple helper function to check if a document is a BillingStatement document */
declare function isBillingStatementDocument(document: unknown): document is BillingStatementDocument;
/** Simple helper function to assert that a document is a BillingStatement document */
declare function assertIsBillingStatementDocument(document: unknown): asserts document is BillingStatementDocument;
//#endregion
//#region document-models/billing-statement/v1/gen/general/operations.d.ts
interface BillingStatementGeneralOperations {
  editBillingStatementOperation: (state: BillingStatementState, action: EditBillingStatementAction, dispatch?: SignalDispatch) => void;
  editContributorOperation: (state: BillingStatementState, action: EditContributorAction, dispatch?: SignalDispatch) => void;
  editStatusOperation: (state: BillingStatementState, action: EditStatusAction, dispatch?: SignalDispatch) => void;
}
//#endregion
//#region document-models/billing-statement/v1/gen/line-items/operations.d.ts
interface BillingStatementLineItemsOperations {
  addLineItemOperation: (state: BillingStatementState, action: AddLineItemAction, dispatch?: SignalDispatch) => void;
  editLineItemOperation: (state: BillingStatementState, action: EditLineItemAction, dispatch?: SignalDispatch) => void;
  deleteLineItemOperation: (state: BillingStatementState, action: DeleteLineItemAction, dispatch?: SignalDispatch) => void;
}
//#endregion
//#region document-models/billing-statement/v1/gen/tags/operations.d.ts
interface BillingStatementTagsOperations {
  editLineItemTagOperation: (state: BillingStatementState, action: EditLineItemTagAction, dispatch?: SignalDispatch) => void;
}
//#endregion
//#region document-models/billing-statement/v1/hooks.d.ts
/** Hook to get a BillingStatement document by its id */
declare function useBillingStatementDocumentById(documentId: string | null | undefined): [BillingStatementDocument, DocumentDispatch<BillingStatementAction>] | [undefined, undefined];
/** Hook to get the selected BillingStatement document */
declare function useSelectedBillingStatementDocument(): [BillingStatementDocument, DocumentDispatch<BillingStatementAction>];
/** Hook to get all BillingStatement documents in the selected drive */
declare function useBillingStatementDocumentsInSelectedDrive(): BillingStatementDocument[] | undefined;
/** Hook to get all BillingStatement documents in the selected folder */
declare function useBillingStatementDocumentsInSelectedFolder(): BillingStatementDocument[] | undefined;
//#endregion
//#region document-models/billing-statement/v1/actions.d.ts
/** Actions for the BillingStatement document model */
declare const actions: {
  editLineItemTag: (input: EditLineItemTagInput) => EditLineItemTagAction;
  addLineItem: (input: AddLineItemInput) => AddLineItemAction;
  editLineItem: (input: EditLineItemInput) => EditLineItemAction;
  deleteLineItem: (input: DeleteLineItemInput) => DeleteLineItemAction;
  editBillingStatement: (input: EditBillingStatementInput) => EditBillingStatementAction;
  editContributor: (input: EditContributorInput) => EditContributorAction;
  editStatus: (input: EditStatusInput) => EditStatusAction;
  setName: (name: string | {
    name: string;
  }) => SetNameAction;
  undo: (count?: number, scope?: string) => UndoAction;
  redo: (count?: number, scope?: string) => RedoAction;
  prune: (start?: number, end?: number, scope?: string) => SchemaPruneAction;
  loadState: <TState extends PHBaseState = PHBaseState>(state: TState & {
    name: string;
  }, operations: number) => LoadStateAction;
  noop: (scope?: string) => NOOPAction;
};
//#endregion
//#region document-models/billing-statement/v1/utils.d.ts
/** Utils for the BillingStatement document model */
declare const utils: DocumentModelUtils<BillingStatementPHState>;
//#endregion
//#region document-models/billing-statement/upgrades/versions.d.ts
declare const supportedVersions: readonly [1];
declare const latestVersion: 1;
//#endregion
//#region document-models/billing-statement/upgrades/upgrade-manifest.d.ts
declare const billingStatementUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
//#endregion
export { AddLineItemAction, AddLineItemInput, AddLineItemInputSchema, BillingStatementAction, BillingStatementController, BillingStatementDocument, BillingStatementDocumentHeaderSchema, BillingStatementDocumentSchema, BillingStatementGeneralAction, BillingStatementGeneralOperations, BillingStatementState as BillingStatementGlobalState, BillingStatementState, BillingStatementLineItem, BillingStatementLineItemSchema, BillingStatementLineItemsAction, BillingStatementLineItemsOperations, BillingStatementLocalState, BillingStatementPHState, BillingStatementPHStateSchema, BillingStatementStateSchema, BillingStatementStatus, BillingStatementStatusInput, BillingStatementStatusInputSchema, BillingStatementStatusSchema, BillingStatementTag, BillingStatementTagSchema, BillingStatementTagsAction, BillingStatementTagsOperations, BillingStatementUnit, BillingStatementUnitInput, BillingStatementUnitInputSchema, BillingStatementUnitSchema, DeleteLineItemAction, DeleteLineItemInput, DeleteLineItemInputSchema, EditBillingStatementAction, EditBillingStatementInput, EditBillingStatementInputSchema, EditContributorAction, EditContributorInput, EditContributorInputSchema, EditLineItemAction, EditLineItemInput, EditLineItemInputSchema, EditLineItemTagAction, EditLineItemTagInput, EditLineItemTagInputSchema, EditStatusAction, EditStatusInput, EditStatusInputSchema, Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Scalars, actions, addLineItem, assertIsBillingStatementDocument, assertIsBillingStatementState, billingStatementDocumentType, creators_d_exports as billingStatementGeneralActions, creators_d_exports$1 as billingStatementLineItemsActions, creators_d_exports$2 as billingStatementTagsActions, billingStatementUpgradeManifest, createBillingStatementDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, deleteLineItem, documentModel, editBillingStatement, editContributor, editLineItem, editLineItemTag, editStatus, initialGlobalState, initialLocalState, isBillingStatementDocument, isBillingStatementState, isDefinedNonNullAny, latestVersion, reducer, supportedVersions, useBillingStatementDocumentById, useBillingStatementDocumentsInSelectedDrive, useBillingStatementDocumentsInSelectedFolder, useSelectedBillingStatementDocument, utils };
//# sourceMappingURL=index.d.ts.map