import { C as PHBaseState, E as PHDocumentState, F as UpgradeManifest, M as SetNameAction, N as SignalDispatch, O as RedoAction, P as UndoAction, S as PHAuthState, c as DocumentModelGlobalState, d as DocumentModelUtils, g as LoadStateAction, j as SchemaPruneAction, k as Reducer, r as PHDocumentController, t as ActionMap, w as PHDocument, y as NOOPAction } from "../../index-DQ5mRIVf.js";
import { a as ZodString, c as $strip, i as ZodObject, o as ZodType, r as ZodLiteral, s as $ZodTypeInternals, t as ZodAny } from "../../schemas-BLV80XhZ.js";
import { t as DocumentDispatch } from "../../index-B1aYlvX9.js";
import { S as SetGroupNameInput, _ as MakeOptional, a as ReorderChannelsAction, b as ReorderChannelsInput, c as GroupLocalState, d as Exact, f as GroupState, g as MakeMaybe, h as MakeEmpty, i as RemoveChannelAction, l as GroupPHState, m as InputMaybe, n as AddChannelAction, o as SetGroupNameAction, p as Incremental, r as GroupGroupAction, s as GroupDocument, t as GroupAction, u as AddChannelInput, v as Maybe, x as Scalars, y as RemoveChannelInput } from "../../actions-B0TcdnxK.js";

//#region document-models/group/v1/gen/document-model.d.ts
declare const documentModel: DocumentModelGlobalState;
declare namespace creators_d_exports {
  export { addChannel, removeChannel, reorderChannels, setGroupName };
}
declare const setGroupName: (input: SetGroupNameInput) => SetGroupNameAction;
declare const addChannel: (input: AddChannelInput) => AddChannelAction;
declare const removeChannel: (input: RemoveChannelInput) => RemoveChannelAction;
declare const reorderChannels: (input: ReorderChannelsInput) => ReorderChannelsAction;
//#endregion
//#region document-models/group/v1/gen/ph-factories.d.ts
declare function defaultGlobalState(): GroupState;
declare function defaultLocalState(): GroupLocalState;
declare function defaultPHState(): GroupPHState;
declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<GroupState>, localState?: Partial<GroupLocalState>): GroupPHState;
/**
 * Creates a GroupDocument with custom global and local state
 * This properly handles the PHBaseState requirements while allowing
 * document-specific state to be set.
 */
declare function createGroupDocument(state?: Partial<{
  auth?: Partial<PHAuthState>;
  document?: Partial<PHDocumentState>;
  global?: Partial<GroupState>;
  local?: Partial<GroupLocalState>;
}>): GroupDocument;
//#endregion
//#region document-models/group/v1/gen/utils.d.ts
declare const initialGlobalState: GroupState;
declare const initialLocalState: GroupLocalState;
//#endregion
//#region document-models/group/v1/gen/reducer.d.ts
declare const reducer: Reducer<GroupPHState>;
//#endregion
//#region document-models/group/v1/gen/controller.d.ts
declare const GroupController: new (initialDocument?: PHDocument<GroupPHState> | undefined) => PHDocumentController<GroupPHState> & ActionMap<GroupGroupAction, PHDocumentController<GroupPHState>>;
//#endregion
//#region document-models/group/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 function AddChannelInputSchema(): ZodObject<Properties<AddChannelInput>>;
declare function GroupStateSchema(): ZodObject<Properties<GroupState>>;
declare function RemoveChannelInputSchema(): ZodObject<Properties<RemoveChannelInput>>;
declare function ReorderChannelsInputSchema(): ZodObject<Properties<ReorderChannelsInput>>;
declare function SetGroupNameInputSchema(): ZodObject<Properties<SetGroupNameInput>>;
//#endregion
//#region document-models/group/v1/gen/document-type.d.ts
declare const groupDocumentType = "powerchat/group";
//#endregion
//#region document-models/group/v1/gen/document-schema.d.ts
/** Schema for validating the header object of a Group document */
declare const GroupDocumentHeaderSchema: ZodObject<{
  id: ZodString;
  name: ZodString;
  createdAtUtcIso: ZodString;
  lastModifiedAtUtcIso: ZodString;
  documentType: ZodLiteral<"powerchat/group">;
}, $strip>;
/** Schema for validating the state object of a Group document */
declare const GroupPHStateSchema: ZodObject<{
  global: ZodObject<Required<{
    channelIds: ZodType<string[], unknown, $ZodTypeInternals<string[], unknown>>;
    name: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
  }>, $strip>;
}, $strip>;
declare const GroupDocumentSchema: ZodObject<{
  header: ZodObject<{
    id: ZodString;
    name: ZodString;
    createdAtUtcIso: ZodString;
    lastModifiedAtUtcIso: ZodString;
    documentType: ZodLiteral<"powerchat/group">;
  }, $strip>;
  state: ZodObject<{
    global: ZodObject<Required<{
      channelIds: ZodType<string[], unknown, $ZodTypeInternals<string[], unknown>>;
      name: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
    }>, $strip>;
  }, $strip>;
  initialState: ZodObject<{
    global: ZodObject<Required<{
      channelIds: ZodType<string[], unknown, $ZodTypeInternals<string[], unknown>>;
      name: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
    }>, $strip>;
  }, $strip>;
}, $strip>;
/** Simple helper function to check if a state object is a Group document state object */
declare function isGroupState(state: unknown): state is GroupPHState;
/** Simple helper function to assert that a document state object is a Group document state object */
declare function assertIsGroupState(state: unknown): asserts state is GroupPHState;
/** Simple helper function to check if a document is a Group document */
declare function isGroupDocument(document: unknown): document is GroupDocument;
/** Simple helper function to assert that a document is a Group document */
declare function assertIsGroupDocument(document: unknown): asserts document is GroupDocument;
//#endregion
//#region document-models/group/v1/gen/group/operations.d.ts
interface GroupGroupOperations {
  setGroupNameOperation: (state: GroupState, action: SetGroupNameAction, dispatch?: SignalDispatch) => void;
  addChannelOperation: (state: GroupState, action: AddChannelAction, dispatch?: SignalDispatch) => void;
  removeChannelOperation: (state: GroupState, action: RemoveChannelAction, dispatch?: SignalDispatch) => void;
  reorderChannelsOperation: (state: GroupState, action: ReorderChannelsAction, dispatch?: SignalDispatch) => void;
}
//#endregion
//#region document-models/group/v1/hooks.d.ts
/** Hook to get a Group document by its id */
declare function useGroupDocumentById(documentId: string | null | undefined): [GroupDocument, DocumentDispatch<GroupAction>] | [undefined, undefined];
/** Hook to get the selected Group document */
declare function useSelectedGroupDocument(): [GroupDocument, DocumentDispatch<GroupAction>];
/** Hook to get all Group documents in the selected drive */
declare function useGroupDocumentsInSelectedDrive(): GroupDocument[] | undefined;
/** Hook to get all Group documents in the selected folder */
declare function useGroupDocumentsInSelectedFolder(): GroupDocument[] | undefined;
//#endregion
//#region document-models/group/v1/actions.d.ts
/** Actions for the Group document model */
declare const actions: {
  setGroupName: (input: SetGroupNameInput) => SetGroupNameAction;
  addChannel: (input: AddChannelInput) => AddChannelAction;
  removeChannel: (input: RemoveChannelInput) => RemoveChannelAction;
  reorderChannels: (input: ReorderChannelsInput) => ReorderChannelsAction;
  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/group/v1/utils.d.ts
/** Utils for the Group document model */
declare const utils: DocumentModelUtils<GroupPHState>;
//#endregion
//#region document-models/group/upgrades/versions.d.ts
declare const supportedVersions: readonly [1];
declare const latestVersion: 1;
//#endregion
//#region document-models/group/upgrades/upgrade-manifest.d.ts
declare const groupUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
//#endregion
export { AddChannelAction, AddChannelInput, AddChannelInputSchema, Exact, GroupAction, GroupController, GroupDocument, GroupDocumentHeaderSchema, GroupDocumentSchema, GroupState as GroupGlobalState, GroupState, GroupGroupAction, GroupGroupOperations, GroupLocalState, GroupPHState, GroupPHStateSchema, GroupStateSchema, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, RemoveChannelAction, RemoveChannelInput, RemoveChannelInputSchema, ReorderChannelsAction, ReorderChannelsInput, ReorderChannelsInputSchema, Scalars, SetGroupNameAction, SetGroupNameInput, SetGroupNameInputSchema, actions, addChannel, assertIsGroupDocument, assertIsGroupState, createGroupDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, groupDocumentType, creators_d_exports as groupGroupActions, groupUpgradeManifest, initialGlobalState, initialLocalState, isDefinedNonNullAny, isGroupDocument, isGroupState, latestVersion, reducer, removeChannel, reorderChannels, setGroupName, supportedVersions, useGroupDocumentById, useGroupDocumentsInSelectedDrive, useGroupDocumentsInSelectedFolder, useSelectedGroupDocument, utils };
//# sourceMappingURL=index.d.ts.map