import * as document_model_graphql_document from 'document-model-graphql/document';
import { BaseAction, SetNameAction, UndoAction, RedoAction, PruneAction, LoadStateAction } from 'document-model-graphql/document';
import { WritableDraft } from 'immer/dist/internal';
import * as document_model_graphql_budget_statement from 'document-model-graphql/budget-statement';
import { BudgetStatementData, BudgetStatementAction, AccountInput, Account, LineItemInput, LineItem, AccountUpdateInput, AuditReportStatus, AuditReport, CommentInput, CommentUpdateInput, BudgetStatementInput, LineItemUpdateInput, LineItemDeleteInput, VestingInput, AuditReportInput, BudgetStatus, Comment, Vesting } from 'document-model-graphql/budget-statement';
import * as document_model_graphql_dist_budget_statement_types from 'document-model-graphql/dist/budget-statement/types';
import * as document_model_graphql_dist_document_types from 'document-model-graphql/dist/document/types';
import JSZip from 'jszip';

/**
 * Defines the basic structure of an action.
 *
 * @typeParam T - The name of the action type. A `string` type by default.
 */
type Action<T = string> = {
    /** The name of the action. */
    type: T;
    /** The payload of the action. */
    input?: unknown;
};
/**
 * A pure function that takes an action and the previous state
 * of the document and returns the new state.
 *
 * @typeParam State - The type of the document data.
 * @typeParam A - The type of the actions supported by the reducer.
 */
type Reducer<State, A extends Action> = (state: Document$1<State, A>, action: A) => Document$1<State, A>;
/**
 * A {@link Reducer} that prevents mutable code from changing the previous state.
 *
 * @remarks
 * This reducer is wrapped with {@link https://immerjs.github.io/immer/ | Immer}.
 * This allows the reducer code to be mutable, making it simpler and
 * avoiding unintended changes in the provided state.
 * The returned state will always be a new object.
 *
 * @typeParam State - The type of the document data.
 * @typeParam A - The type of the actions supported by the reducer.
 */
type ImmutableReducer<State, A extends Action> = (state: WritableDraft<Document$1<State, A>>, action: A) => Document$1<State, A> | void;
/**
 * An operation that was applied to a {@link Document}.
 *
 * @remarks
 * Wraps an action with an index, to be added to the operations history of a Document.
 * The `index` field is used to keep all operations in order and enable replaying the
 * document's history from the beginning.
 *
 * @typeParam A - The type of the action.
 */
type Operation<A extends Action = Action> = A & {
    /** Position of the operation in the history */
    index: number;
    /** Timestamp of when the operation was added */
    timestamp: string;
    /** Hash of the resulting document data after the operation */
    hash: string;
};
/**
 * The base attributes of a {@link Document}.
 */
type DocumentHeader = {
    /** The name of the document. */
    name: string;
    /** The number of operations applied to the document. */
    revision: number;
    /** The type of the document model. */
    documentType: string;
    /** The timestamp of the creation date of the document. */
    created: string;
    /** The timestamp of the last change in the document. */
    lastModified: string;
};
/**
 * The attributes stored for a file. Namely, attachments of a document.
 */
type DocumentFile = {
    /** The binary data of the attachment in Base64 */
    data: string;
    /** The MIME type of the attachment */
    mimeType: string;
    extension?: string | null;
    fileName?: string | null;
};
/**
 * Object that indexes attachments of a Document.
 *
 * @remarks
 * This is used to reduce memory usage to avoid
 * multiple instances of the binary data of the attachments.
 *
 */
type FileRegistry = Record<Attachment, DocumentFile>;
/**
 * The base type of a document model.
 *
 * @remarks
 * This type is extended by all Document models.
 *
 * @typeParam Data - The type of the document data attribute.
 * @typeParam A - The type of the actions supported by the Document.
 */
type Document$1<Data = unknown, A extends Action = Action> = DocumentHeader & {
    /** The document model specific state. */
    data: Data;
    /** The operations history of the document. */
    operations: Operation<A | BaseAction>[];
    /** The initial state of the document, enabling replaying operations. */
    initialState: Omit<Document$1<Data, A>, 'initialState'>;
    /** The index of document attachments. */
    fileRegistry: FileRegistry;
};
/**
 * String type representing an attachment in a Document.
 *
 * @remarks
 * Attachment string is formatted as `attachment://<filename>`.
 */
type Attachment = string;

/**
 * Changes the name of the document.
 *
 * @param name - The name to be set in the document.
 * @category Actions
 */
declare const setName: (name: string) => SetNameAction;
/**
 * Cancels the last `count` operations.
 *
 * @param count - Number of operations to cancel
 * @category Actions
 */
declare const undo: (count?: number) => UndoAction;
/**
 * Cancels the last `count` {@link undo | UNDO} operations.
 *
 * @param count - Number of UNDO operations to cancel
 * @category Actions
 */
declare const redo: (count?: number) => RedoAction;
/**
 * Joins multiple operations into a single {@link loadState | LOAD_STATE} operation.
 *
 * @remarks
 * Useful to keep operations history smaller. Operations to prune are selected by index,
 * similar to the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | slice} method in Arrays.
 *
 * @param start - Index of the first operation to prune
 * @param end - Index of the last operation to prune
 * @category Actions
 */
declare const prune: (start?: number | undefined, end?: number | undefined) => PruneAction;
/**
 * Replaces the state of the document.
 *
 * @remarks
 * This action shouldn't be used directly. It is dispatched by the {@link prune} action.
 *
 * @param state - State to be set in the document.
 * @param operations - Number of operations that were removed from the previous state.
 * @category Actions
 */
declare const loadState: (state: Pick<Document$1, 'data' | 'name'>, operations: number) => LoadStateAction;

declare const creators_loadState: typeof loadState;
declare const creators_prune: typeof prune;
declare const creators_redo: typeof redo;
declare const creators_setName: typeof setName;
declare const creators_undo: typeof undo;
declare namespace creators {
  export {
    creators_loadState as loadState,
    creators_prune as prune,
    creators_redo as redo,
    creators_setName as setName,
    creators_undo as undo,
  };
}

/**
 * This is an abstract class representing a document and provides methods
 * for creating and manipulating documents.
 * @typeparam T - The type of data stored in the document.
 * @typeparam A - The type of action the document can take.
 */
declare abstract class BaseDocument<T, A extends Action> {
    protected state: Document$1<T, A>;
    private reducer;
    /**
     * Constructs a BaseDocument instance with an initial state.
     * @param reducer - The reducer function that updates the state.
     * @param initialState - The initial state of the document.
     */
    constructor(reducer: Reducer<T, A | BaseAction>, initialState?: Partial<Document$1<T, A>> & {
        data: T;
    });
    /**
     * Dispatches an action to update the state of the document.
     * @param action - The action to dispatch.
     * @returns The Document instance.
     */
    protected dispatch(action: A | BaseAction): this;
    /**
     * Saves the state of the document to a file.
     * @param path - The file path where the state should be saved.
     * @param extension - The file extension to use when saving the state.
     * @returns The file path where the state was saved.
     */
    protected saveToFile(path: string, extension: string, name?: string): Promise<string>;
    /**
     * Loads the state of the document from a file.
     * @param path - The file path where the state is stored.
     */
    loadFromFile(path: string): Promise<void>;
    /**
     * Loads the state of the document from a file and returns it.
     * @param path - The file path where the state is stored.
     * @param reducer - The reducer function that updates the state.
     * @returns The state of the document.
     */
    protected static stateFromFile<T, A extends Action>(path: string, reducer: Reducer<T, A | BaseAction>): Promise<Document$1<T, BaseAction | A>>;
    /**
     * Gets the name of the document.
     */
    get name(): string;
    /**
     * Gets the type of document.
     */
    get documentType(): string;
    /**
     * Gets the timestamp of the date the document was created.
     */
    get created(): string;
    /**
     * Gets the timestamp of the date the document was last modified.
     */
    get lastModified(): string;
    /**
     * Gets the revision number of the document.
     */
    get revision(): number;
    /**
     * Gets the initial state of the document.
     */
    get initialState(): Omit<Document$1<T, A>, "initialState">;
    /**
     *    Gets the list of operations performed on the document.
     */
    get operations(): Operation<BaseAction | A>[];
    /**
     * Gets the attachment associated with the given key.
     * @param attachment - The key of the attachment to retrieve.
     */
    getAttachment(attachment: Attachment): DocumentFile;
    /**
     * Sets the name of the document.
     * @param name - The new name of the document.
     */
    setName(name: string): void;
    /**
     * Reverts a number of actions from the document.
     * @param count - The number of actions to revert.
     */
    undo(count: number): void;
    /**
     * Reapplies a number of actions to the document.
     * @param count - The number of actions to reapply.
     */
    redo(count: number): void;
    /**
     * Removes a range of operations from the document.
     * @param start - The starting index of the range to remove.
     * @param end - The ending index of the range to remove.
     */
    prune(start?: number | undefined, end?: number | undefined): void;
    /**
     * Loads a document state and a set of operations.
     * @param state - The state to load.
     * @param operations - The operations to apply to the document.
     */
    loadState(state: Pick<Document$1<T, A>, 'data' | 'name'>, operations: number): void;
}
/**
 * Applies multiple mixins to a base class.
 * Used to have separate mixins to group methods by actions.
 *
 * @remarks
 * {@link https://www.typescriptlang.org/docs/handbook/mixins.html#alternative-pattern}
 *
 * @param derivedCtor - The class to apply the mixins to.
 * @param constructors - The constructors of the mixins.
 */
declare function applyMixins(derivedCtor: any, constructors: any[]): void;

/**
 * Base document reducer that wraps a custom document reducer and handles
 * document-level actions such as undo, redo, prune, and set name.
 *
 * @template T - The type of the state of the custom reducer.
 * @template A - The type of the actions of the custom reducer.
 * @param state - The current state of the document.
 * @param action - The action object to apply to the state.
 * @param customReducer - The custom reducer that implements the application logic
 * specific to the document's state.
 * @returns The new state of the document.
 */
declare function baseReducer<T, A extends Action>(state: Document$1<T, A>, action: A | BaseAction, customReducer: ImmutableReducer<T, A>): Document$1<T, A>;

/**
 * Helper function to be used by action creators.
 *
 * @remarks
 * Creates an action with the given type and input properties. The input
 * properties default to an empty object.
 *
 * @typeParam A - Type of the action to be returned.
 *
 * @param type - The type of the action.
 * @param input - The input properties of the action.
 *
 * @throws Error if the type is empty or not a string.
 *
 * @returns The new action.
 */
declare function createAction<A extends Action>(type: A['type'], input?: A['input'], validator?: () => {
    parse(v: unknown): A;
}): A;
/**
 * Helper function to create a document model reducer.
 *
 * @remarks
 * This function creates a new reducer that wraps the provided `reducer` with
 * `documentReducer`, adding support for document actions:
 *   - `SET_NAME`
 *   - `UNDO`
 *   - `REDO`
 *   - `PRUNE`
 *
 * It also updates the document-related attributes on every operation.
 *
 * @param reducer - The custom reducer to wrap.
 * @param documentReducer - The document reducer to use.
 *
 * @returns The new reducer.
 */
declare function createReducer<T = unknown, A extends Action = Action>(reducer: ImmutableReducer<T, A>, documentReducer?: typeof baseReducer): (state: Document$1<T, A | BaseAction>, action: A | BaseAction) => Document$1<T, A>;
/**
 * Builds the initial document state from the provided data.
 *
 * @typeParam T - The type of the data.
 * @typeParam A - The type of the actions.
 *
 * @param initialState - The initial state of the document. The `data` property
 *   is required, but all other properties are optional.
 *
 * @returns The new document state.
 */
declare const createDocument: <T, A extends Action<string>>(initialState?: (Partial<Document$1<T, A>> & {
    data: T;
}) | undefined) => Document$1<T, A>;
declare const hashDocument: (state: Document$1) => string;
declare const hashKey: (date?: Date, randomLimit?: number) => string;

type FileInput = string | number[] | Uint8Array | ArrayBuffer | Blob;
declare const createZip: (document: Document$1) => Promise<JSZip>;
/**
 * Saves a document to a ZIP file.
 *
 * @remarks
 * This function creates a ZIP file containing the document's state, operations,
 * and file attachments. The file is saved to the specified path.
 *
 * @param document - The document to save to the file.
 * @param path - The path to save the file to.
 * @param extension - The extension to use for the file.
 * @returns A promise that resolves to the path of the saved file.
 */
declare const saveToFile: (document: Document$1, path: string, extension: string, name?: string) => Promise<string>;
/**
 * Loads a document from a ZIP file.
 *
 * @remarks
 * This function reads a ZIP file and returns the document state after
 * applying all the operations. The reducer is used to apply the operations.
 *
 * @typeParam S - The type of the state object.
 * @typeParam A - The type of the actions that can be applied to the state object.
 *
 * @param path - The path to the ZIP file.
 * @param reducer - The reducer to apply the operations to the state object.
 * @returns A promise that resolves to the document state after applying all the operations.
 * @throws An error if the initial state or the operations history is not found in the ZIP file.
 */
declare const loadFromFile: <S, A extends Action<string>>(path: string, reducer: Reducer<S, BaseAction | A>) => Promise<Document$1<S, BaseAction | A>>;
declare const loadFromInput: <S, A extends Action<string>>(input: FileInput, reducer: Reducer<S, BaseAction | A>) => Promise<Document$1<S, BaseAction | A>>;
/**
 * Fetches an attachment from a URL and returns its base64-encoded data and MIME type.
 * @param url - The URL of the attachment to fetch.
 * @returns A Promise that resolves to an object containing the base64-encoded data and MIME type of the attachment.
 */
declare function getRemoteFile(url: string): Promise<DocumentFile>;
/**
 * Reads an attachment from a file and returns its base64-encoded data and MIME type.
 * @param path - The path of the attachment file to read.
 * @returns A Promise that resolves to an object containing the base64-encoded data and MIME type of the attachment.
 */
declare function getLocalFile(path: string): Promise<DocumentFile>;
/**
 * Returns the SHA1 hash of the given attachment data.
 * @param data - The base64-encoded data of the attachment to hash.
 * @returns The hash of the attachment data.
 */
declare function hashAttachment(data: string): string;

type index_FileInput = FileInput;
declare const index_createAction: typeof createAction;
declare const index_createDocument: typeof createDocument;
declare const index_createReducer: typeof createReducer;
declare const index_createZip: typeof createZip;
declare const index_getLocalFile: typeof getLocalFile;
declare const index_getRemoteFile: typeof getRemoteFile;
declare const index_hashAttachment: typeof hashAttachment;
declare const index_hashDocument: typeof hashDocument;
declare const index_hashKey: typeof hashKey;
declare const index_loadFromFile: typeof loadFromFile;
declare const index_loadFromInput: typeof loadFromInput;
declare const index_saveToFile: typeof saveToFile;
declare namespace index {
  export {
    index_FileInput as FileInput,
    index_createAction as createAction,
    index_createDocument as createDocument,
    index_createReducer as createReducer,
    index_createZip as createZip,
    index_getLocalFile as getLocalFile,
    index_getRemoteFile as getRemoteFile,
    index_hashAttachment as hashAttachment,
    index_hashDocument as hashDocument,
    index_hashKey as hashKey,
    index_loadFromFile as loadFromFile,
    index_loadFromInput as loadFromInput,
    index_saveToFile as saveToFile,
  };
}

type Document_Action<T = string> = Action<T>;
type Document_Attachment = Attachment;
type Document_BaseDocument<T, A extends Action> = BaseDocument<T, A>;
declare const Document_BaseDocument: typeof BaseDocument;
type Document_DocumentFile = DocumentFile;
type Document_DocumentHeader = DocumentHeader;
type Document_FileRegistry = FileRegistry;
type Document_ImmutableReducer<State, A extends Action> = ImmutableReducer<State, A>;
type Document_Operation<A extends Action = Action> = Operation<A>;
type Document_Reducer<State, A extends Action> = Reducer<State, A>;
declare const Document_applyMixins: typeof applyMixins;
declare const Document_baseReducer: typeof baseReducer;
declare namespace Document {
  export {
    Document_Action as Action,
    Document_Attachment as Attachment,
    Document_BaseDocument as BaseDocument,
    Document$1 as Document,
    Document_DocumentFile as DocumentFile,
    Document_DocumentHeader as DocumentHeader,
    Document_FileRegistry as FileRegistry,
    Document_ImmutableReducer as ImmutableReducer,
    Document_Operation as Operation,
    Document_Reducer as Reducer,
    creators as actions,
    Document_applyMixins as applyMixins,
    Document_baseReducer as baseReducer,
    index as utils,
  };
}

/**
 * Represents the state of a budget statement.
 */
type State = BudgetStatementData;
/**
 * Represents a budget statement document, which extends the base Document type.
 */
type BudgetStatementDocument = Document$1<State, BudgetStatementAction>;

/**
 * Reducer for the BudgetStatement module, which handles operations related to budget statements.
 * @remarks
 * This reducer handles the following actions:
 * - `INIT`: initializes the state of the module.
 * - `ADD_ACCOUNT`: adds an account to the state.
 * - `UPDATE_ACCOUNT`: updates an account in the state.
 * - `DELETE_ACCOUNT`: removes an account from the state.
 * - `ADD_LINE_ITEM`: adds a line item to an account in the state.
 * - `UPDATE_LINE_ITEM`: updates a line item in an account in the state.
 * - `DELETE_LINE_ITEM`: removes a line item from an account in the state.
 * - `SUBMIT_FOR_REVIEW`: updates the status of the budget statement to "Under Review".
 * - `ESCALATE`: escalates the budget statement to a higher authority.
 * - `APPROVE`: approves the budget statement.
 * - `REOPEN_TO_DRAFT`: changes the status of the budget statement to "Draft".
 * - `REOPEN_TO_REVIEW`: changes the status of the budget statement to "Under Review".
 * - `ADD_AUDIT_REPORT`: adds an audit report to an account in the state.
 * - `DELETE_AUDIT_REPORT`: removes an audit report from an account in the state.
 * @param state - The current state of the module.
 * @param action - The action to be performed on the state.
 * @returns The new state after applying the action.
 */
declare const reducer: (state: Document$1<document_model_graphql_budget_statement.BudgetStatementData, document_model_graphql_dist_document_types.BaseAction | BudgetStatementAction>, action: document_model_graphql_dist_document_types.BaseAction | BudgetStatementAction) => Document$1<document_model_graphql_budget_statement.BudgetStatementData, BudgetStatementAction>;

/**
 *
 * Creates a new BudgetStatement document with an initial state.
 * @param initialState - The initial state of the document.
 * @returns The new BudgetStatement document.
 */
declare const createBudgetStatement: (initialState?: Partial<Omit<BudgetStatementDocument, 'data'> & {
    data: Partial<BudgetStatementDocument['data']>;
}>) => BudgetStatementDocument;
/**
 * Creates a new Account with default properties and the given input properties.
 * @param input - The input properties of the account.
 * @returns The new Account object.
 */
declare const createAccount: (input: AccountInput) => Account;
/**
 * Creates a new LineItem with default properties and the given input properties.
 * @param input - The input properties of the line item.
 * @returns The new LineItem object.
 */
declare const createLineItem: (input: LineItemInput) => LineItem;
/**
 * Saves the BudgetStatement document to the specified file path.
 * @param document - The BudgetStatement document to save.
 * @param path - The file path to save the document to.
 * @returns  A promise that resolves with the saved file path.
 */
declare const saveBudgetStatementToFile: (document: BudgetStatementDocument, path: string, name?: string) => Promise<string>;
/**
 * Loads the BudgetStatement document from the specified file path.
 * @param path - The file path to load the document from.
 * @returns A promise that resolves with the loaded BudgetStatement document.
 */
declare const loadBudgetStatementFromFile: (path: string) => Promise<BudgetStatementDocument>;
declare const loadBudgetStatementFromInput: (input: FileInput) => Promise<BudgetStatementDocument>;
declare const saveBudgetStatementToFileHandle: (document: BudgetStatementDocument, input: FileSystemFileHandle) => Promise<void>;

declare const utils_createAccount: typeof createAccount;
declare const utils_createBudgetStatement: typeof createBudgetStatement;
declare const utils_createLineItem: typeof createLineItem;
declare const utils_loadBudgetStatementFromFile: typeof loadBudgetStatementFromFile;
declare const utils_loadBudgetStatementFromInput: typeof loadBudgetStatementFromInput;
declare const utils_saveBudgetStatementToFile: typeof saveBudgetStatementToFile;
declare const utils_saveBudgetStatementToFileHandle: typeof saveBudgetStatementToFileHandle;
declare namespace utils {
  export {
    utils_createAccount as createAccount,
    utils_createBudgetStatement as createBudgetStatement,
    utils_createLineItem as createLineItem,
    utils_loadBudgetStatementFromFile as loadBudgetStatementFromFile,
    utils_loadBudgetStatementFromInput as loadBudgetStatementFromInput,
    utils_saveBudgetStatementToFile as saveBudgetStatementToFile,
    utils_saveBudgetStatementToFileHandle as saveBudgetStatementToFileHandle,
  };
}

/**
 * Account related methods and getters
 */
declare class AccountObject extends BaseDocument<State, BudgetStatementAction> {
    /**
     * Adds one or more accounts to the budget statement.
     * @param accounts An array of AccountInput objects to add.
     *
     * @group Account
     */
    addAccount(accounts: AccountInput[]): this;
    /**
     * Updates one or more existing accounts in the budget statement.
     * @param accounts An array of AccountInput objects to update.
     *
     * @group Account
     */
    updateAccount(accounts: AccountUpdateInput[]): this;
    /**
     * Deletes one or more accounts from the budget statement.
     * @param addresses An array of addresses of the accounts to delete.
     *
     * @group Account
     */
    deleteAccount(accounts: Account['address'][]): this;
    /**
     * Returns an array of all accounts in the budget statement.
     *
     * @group Account
     */
    get accounts(): Account[];
    /**
     * Returns the Account object with the specified address.
     * @param address The address of the Account to retrieve.
     *
     * @group Account
     */
    getAccount(address: Account['address']): Account | undefined;
}

declare class AuditObject extends BaseDocument<State, BudgetStatementAction> {
    /**
     * Adds audit reports to the budget statement.
     * @param reports - An array of audit report objects to add.
     *
     * @group Audit
     */
    addAuditReport(reports: {
        timestamp?: string;
        status: AuditReportStatus;
        report: DocumentFile;
    }[]): this;
    /**
     * Deletes audit reports from the budget statement.
     * @param reports - An array of objects that contain the report attachment name of the audits items to be deleted.
     *
     * @group Audit
     */
    deleteAuditReport(reports: AuditReport['report'][]): this;
    /**
     * Retrieves all audit reports from the budget statement.
     * @returns An array of audit report objects.
     *
     * @group Audit
     */
    getAuditReports(): AuditReport[];
    /**
     * Retrieves a specific audit report from the budget statement.
     * @param report - The name of the attachment of the report to be retrieved.
     * @returns The audit report object if it exists, or undefined if not.
     *
     * @group Audit
     */
    getAuditReport(report: AuditReport['report']): AuditReport | undefined;
}

declare class CommentObject extends BaseDocument<State, BudgetStatementAction> {
    addComment(comments: CommentInput[]): this;
    updateComment(comments: CommentUpdateInput[]): this;
    deleteComment(comments: string[]): this;
}

declare class InitObject extends BaseDocument<State, BudgetStatementAction> {
    /**
     * Initializes the state of the budget statement with the provided partial object.
     *
     * @param budgetStatement - A partial object of the budget statement to initialize.
     */
    init(budgetStatement: BudgetStatementInput): this;
}

declare class LineItemObject extends BaseDocument<State, BudgetStatementAction> {
    /**
     * Adds a line item to the specified account.
     * @param account The address of the account to which the line item will be added.
     * @param lineItems An array of line item objects to be added to the account.
     *
     * @group Line Item
     */
    addLineItem(account: Account['address'], lineItems: (Partial<LineItem> & Pick<LineItem, 'category' | 'group'>)[]): this;
    /**
     * Updates line items for the specified account.
     * @param account The address of the account for which line items will be updated.
     * @param lineItems An array of line item input objects to be updated.
     *
     * @group Line Item
     */
    updateLineItem(account: Account['address'], lineItems: LineItemUpdateInput[]): this;
    /**
     * Deletes line items for the specified account.
     * @param account The address of the account for which line items will be deleted.
     * @param lineItems An array of objects that contain the category and group of the line items to be deleted.
     *
     * @group Line Item
     */
    deleteLineItem(account: Account['address'], lineItems: LineItemDeleteInput[]): this;
    /**
     * Retrieves line items for the specified account.
     * @param account The address of the account for which line items will be retrieved.
     * @returns An array of line item objects for the specified account, or undefined if the account does not exist.
     *
     * @group Line Item
     */
    getLineItems(account: Account['address']): LineItem[] | undefined;
    /**
     * Retrieves a specific line item for the specified account.
     * @param account The address of the account for which the line item will be retrieved.
     * @param lineItem An object that contains the category and group of the line item to be retrieved.
     * @returns The line item object that matches the specified category and group, or undefined if it does not exist.
     *
     * @group Line Item
     */
    getLineItem(account: Account['address'], lineItem: LineItemDeleteInput): LineItem | undefined;
}

declare class VestingObject extends BaseDocument<State, BudgetStatementAction> {
    addVesting(vesting: VestingInput[]): this;
    updateVesting(vesting: VestingInput[]): this;
    deleteVesting(vesting: string[]): this;
}

/**
 * Represents a BudgetStatement object that extends the {@link BaseDocument} class to provide a convenient
 * interface for managing a budget statement.
 */
interface BudgetStatement$2 extends AccountObject, AuditObject, CommentObject, InitObject, LineItemObject, VestingObject {
}
/**
 * Represents a budget statement document.
 *
 * @extends BaseDocument<State, BudgetStatementAction>
 * @module
 */
declare class BudgetStatement$2 extends BaseDocument<State, BudgetStatementAction> {
    /**
     * The file extension used to save budget statements.
     */
    static fileExtension: string;
    /**
     *
     * Creates a new BudgetStatement instance.
     * @param initialState - An optional object representing the initial state of the BudgetStatement.
     */
    constructor(initialState?: Partial<Omit<BudgetStatementDocument, 'data'> & {
        data: Partial<BudgetStatementDocument['data']>;
    }>);
    /**
     * Gets the month of the budget statement.
     * @category Budget Statement
     */
    get month(): document_model_graphql_budget_statement.Maybe<string>;
    /**
     * Gets the owner of the budget statement.
     * @category Budget Statement
     */
    get owner(): document_model_graphql_budget_statement.Maybe<document_model_graphql_budget_statement.Owner>;
    /**
     * Gets the quote currency of the budget statement.
     * @category Budget Statement
     */
    get quoteCurrency(): document_model_graphql_budget_statement.Maybe<string>;
    /**
     * Saves the budget statement to a file.
     *
     * @param path The path to the file to save.
     * @returns A promise that resolves when the save operation completes.
     */
    saveToFile(path: string, name?: string): Promise<string>;
    /**
     * Loads the budget statement from a file.
     *
     * @param path The path to the file to load.
     * @returns A promise that resolves with the loaded `BudgetStatement` instance.
     */
    loadFromFile(path: string): Promise<void>;
    /**
     * Creates a new `BudgetStatement` instance from a file.
     *
     * @param path The path to the file to load.
     * @returns A promise that resolves with the loaded `BudgetStatement` instance.
     */
    static fromFile(path: string): Promise<BudgetStatement$2>;
}

declare const BudgetStatement: typeof BudgetStatement$2;
declare const actions: {
    addAccount: (accounts: document_model_graphql_dist_budget_statement_types.AccountInput[]) => document_model_graphql_budget_statement.AddAccountAction;
    updateAccount: (accounts: document_model_graphql_budget_statement.AccountUpdateInput[]) => document_model_graphql_budget_statement.UpdateAccountAction;
    deleteAccount: (accounts: string[]) => document_model_graphql_budget_statement.DeleteAccountAction;
    addAuditReport: (reports: {
        timestamp?: string | undefined;
        status: document_model_graphql_dist_budget_statement_types.AuditReportStatus;
        report: DocumentFile;
    }[]) => document_model_graphql_budget_statement.AddAuditReportAction;
    deleteAuditReport: (reports: string[]) => document_model_graphql_budget_statement.DeleteAuditReportAction;
    addComment: (comments: document_model_graphql_dist_budget_statement_types.CommentInput[]) => document_model_graphql_budget_statement.AddCommentAction;
    updateComment: (comments: document_model_graphql_budget_statement.CommentUpdateInput[]) => document_model_graphql_budget_statement.UpdateCommentAction;
    deleteComment: (comments: string[]) => document_model_graphql_budget_statement.DeleteCommentAction;
    init: (budgetStatement: document_model_graphql_budget_statement.BudgetStatementInput) => document_model_graphql_budget_statement.InitAction;
    addLineItem: (account: string, lineItems: (Partial<document_model_graphql_dist_budget_statement_types.LineItem> & Pick<document_model_graphql_dist_budget_statement_types.LineItem, "category" | "group">)[]) => document_model_graphql_budget_statement.AddLineItemAction;
    updateLineItem: (account: string, lineItems: document_model_graphql_budget_statement.LineItemUpdateInput[]) => document_model_graphql_budget_statement.UpdateLineItemAction;
    deleteLineItem: (account: string, lineItems: document_model_graphql_budget_statement.LineItemDeleteInput[]) => document_model_graphql_budget_statement.DeleteLineItemAction;
    addVesting: (vesting: document_model_graphql_dist_budget_statement_types.VestingInput[]) => document_model_graphql_budget_statement.AddVestingAction;
    updateVesting: (vesting: document_model_graphql_dist_budget_statement_types.VestingInput[]) => document_model_graphql_budget_statement.UpdateVestingAction;
    deleteVesting: (vesting: string[]) => document_model_graphql_budget_statement.DeleteVestingAction;
    setName: (name: string) => document_model_graphql_document.SetNameAction;
    undo: (count?: number) => document_model_graphql_document.UndoAction;
    redo: (count?: number) => document_model_graphql_document.RedoAction;
    prune: (start?: number | undefined, end?: number | undefined) => document_model_graphql_document.PruneAction;
    loadState: (state: Pick<Document$1<unknown, Action<string>>, "name" | "data">, operations: number) => document_model_graphql_document.LoadStateAction;
};

declare const BudgetStatement$1_Account: typeof Account;
declare const BudgetStatement$1_AccountInput: typeof AccountInput;
declare const BudgetStatement$1_AuditReport: typeof AuditReport;
declare const BudgetStatement$1_AuditReportInput: typeof AuditReportInput;
declare const BudgetStatement$1_AuditReportStatus: typeof AuditReportStatus;
declare const BudgetStatement$1_BudgetStatement: typeof BudgetStatement;
declare const BudgetStatement$1_BudgetStatementAction: typeof BudgetStatementAction;
type BudgetStatement$1_BudgetStatementDocument = BudgetStatementDocument;
declare const BudgetStatement$1_BudgetStatus: typeof BudgetStatus;
declare const BudgetStatement$1_Comment: typeof Comment;
declare const BudgetStatement$1_CommentInput: typeof CommentInput;
declare const BudgetStatement$1_LineItem: typeof LineItem;
declare const BudgetStatement$1_LineItemInput: typeof LineItemInput;
type BudgetStatement$1_State = State;
declare const BudgetStatement$1_Vesting: typeof Vesting;
declare const BudgetStatement$1_VestingInput: typeof VestingInput;
declare const BudgetStatement$1_actions: typeof actions;
declare const BudgetStatement$1_reducer: typeof reducer;
declare const BudgetStatement$1_utils: typeof utils;
declare namespace BudgetStatement$1 {
  export {
    BudgetStatement$1_Account as Account,
    BudgetStatement$1_AccountInput as AccountInput,
    BudgetStatement$1_AuditReport as AuditReport,
    BudgetStatement$1_AuditReportInput as AuditReportInput,
    BudgetStatement$1_AuditReportStatus as AuditReportStatus,
    BudgetStatement$1_BudgetStatement as BudgetStatement,
    BudgetStatement$1_BudgetStatementAction as BudgetStatementAction,
    BudgetStatement$1_BudgetStatementDocument as BudgetStatementDocument,
    BudgetStatement$1_BudgetStatus as BudgetStatus,
    BudgetStatement$1_Comment as Comment,
    BudgetStatement$1_CommentInput as CommentInput,
    BudgetStatement$1_LineItem as LineItem,
    BudgetStatement$1_LineItemInput as LineItemInput,
    BudgetStatement$1_State as State,
    BudgetStatement$1_Vesting as Vesting,
    BudgetStatement$1_VestingInput as VestingInput,
    BudgetStatement$1_actions as actions,
    BudgetStatement$1_reducer as reducer,
    BudgetStatement$1_utils as utils,
  };
}

declare const DocumentModels: {
    'powerhouse/document': typeof BudgetStatement$1;
    'powerhouse/budget-statement': typeof BudgetStatement$1;
};
declare const _default: {
    BudgetStatement: typeof BudgetStatement$1;
    Document: typeof Document;
};

export { BudgetStatement$1 as BudgetStatement, Document, DocumentModels, _default as default };
