import * as document_model_graphql_document from 'document-model-graphql/document';
import { D as Document, F as FileInput, B as BaseDocument, a as DocumentFile, A as Action } from './file-6c48faa6.js';
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';

/**
 * Represents the state of a budget statement.
 */
type State = BudgetStatementData;
/**
 * Represents a budget statement document, which extends the base Document type.
 */
type BudgetStatementDocument = Document<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<document_model_graphql_budget_statement.BudgetStatementData, document_model_graphql_dist_document_types.BaseAction | BudgetStatementAction>, action: document_model_graphql_dist_document_types.BaseAction | BudgetStatementAction) => Document<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;
    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;
    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<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,
  };
}

export { BudgetStatement$1 as B, State as S, BudgetStatement as a, actions as b, BudgetStatementDocument as c, reducer as r, utils as u };
