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, n as ZodEnum, o as ZodType, r as ZodLiteral, s as $ZodTypeInternals, t as ZodAny } from "../../schemas-BLV80XhZ.js";
import { A as SetChannelDescriptionInput, C as MakeMaybe, D as ParticipantRole, E as Participant, F as UpdateParticipantRoleInput, M as SetChannelTopicInput, N as SetChannelTypeInput, O as RemoveParticipantInput, P as SetChannelVisibilityInput, S as MakeEmpty, T as Maybe, _ as ChannelType, a as UpdateParticipantRoleAction, b as Incremental, c as SetChannelNameAction, d as SetChannelVisibilityAction, f as ChannelDocument, g as ChannelState, h as AddParticipantInput, i as RemoveParticipantAction, j as SetChannelNameInput, k as Scalars, l as SetChannelTopicAction, m as ChannelPHState, n as AddParticipantAction, o as ChannelChannelAction, p as ChannelLocalState, r as ChannelParticipantsAction, s as SetChannelDescriptionAction, t as ChannelAction, u as SetChannelTypeAction, v as ChannelVisibility, w as MakeOptional, x as InputMaybe, y as Exact } from "../../actions-Cy1sbdql.js";
import { t as DocumentDispatch } from "../../index-B1aYlvX9.js";

//#region document-models/channel/v1/gen/document-model.d.ts
declare const documentModel: DocumentModelGlobalState;
declare namespace creators_d_exports {
  export { setChannelDescription, setChannelName, setChannelTopic, setChannelType, setChannelVisibility };
}
declare const setChannelName: (input: SetChannelNameInput) => SetChannelNameAction;
declare const setChannelDescription: (input: SetChannelDescriptionInput) => SetChannelDescriptionAction;
declare const setChannelVisibility: (input: SetChannelVisibilityInput) => SetChannelVisibilityAction;
declare const setChannelTopic: (input: SetChannelTopicInput) => SetChannelTopicAction;
declare const setChannelType: (input: SetChannelTypeInput) => SetChannelTypeAction;
declare namespace creators_d_exports$1 {
  export { addParticipant, removeParticipant, updateParticipantRole };
}
declare const addParticipant: (input: AddParticipantInput) => AddParticipantAction;
declare const removeParticipant: (input: RemoveParticipantInput) => RemoveParticipantAction;
declare const updateParticipantRole: (input: UpdateParticipantRoleInput) => UpdateParticipantRoleAction;
//#endregion
//#region document-models/channel/v1/gen/ph-factories.d.ts
declare function defaultGlobalState(): ChannelState;
declare function defaultLocalState(): ChannelLocalState;
declare function defaultPHState(): ChannelPHState;
declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<ChannelState>, localState?: Partial<ChannelLocalState>): ChannelPHState;
/**
 * Creates a ChannelDocument with custom global and local state
 * This properly handles the PHBaseState requirements while allowing
 * document-specific state to be set.
 */
declare function createChannelDocument(state?: Partial<{
  auth?: Partial<PHAuthState>;
  document?: Partial<PHDocumentState>;
  global?: Partial<ChannelState>;
  local?: Partial<ChannelLocalState>;
}>): ChannelDocument;
//#endregion
//#region document-models/channel/v1/gen/utils.d.ts
declare const initialGlobalState: ChannelState;
declare const initialLocalState: ChannelLocalState;
//#endregion
//#region document-models/channel/v1/gen/reducer.d.ts
declare const reducer: Reducer<ChannelPHState>;
//#endregion
//#region document-models/channel/v1/gen/controller.d.ts
declare const ChannelController: new (initialDocument?: PHDocument<ChannelPHState> | undefined) => PHDocumentController<ChannelPHState> & ActionMap<ChannelAction, PHDocumentController<ChannelPHState>>;
//#endregion
//#region document-models/channel/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 ChannelTypeSchema: ZodEnum<{
  TEXT: "TEXT";
  VOICE: "VOICE";
}>;
declare const ChannelVisibilitySchema: ZodEnum<{
  PRIVATE: "PRIVATE";
  PUBLIC: "PUBLIC";
}>;
declare const ParticipantRoleSchema: ZodEnum<{
  ADMIN: "ADMIN";
  GUEST: "GUEST";
  MEMBER: "MEMBER";
  OWNER: "OWNER";
}>;
declare function AddParticipantInputSchema(): ZodObject<Properties<AddParticipantInput>>;
declare function ChannelStateSchema(): ZodObject<Properties<ChannelState>>;
declare function ParticipantSchema(): ZodObject<Properties<Participant>>;
declare function RemoveParticipantInputSchema(): ZodObject<Properties<RemoveParticipantInput>>;
declare function SetChannelDescriptionInputSchema(): ZodObject<Properties<SetChannelDescriptionInput>>;
declare function SetChannelNameInputSchema(): ZodObject<Properties<SetChannelNameInput>>;
declare function SetChannelTopicInputSchema(): ZodObject<Properties<SetChannelTopicInput>>;
declare function SetChannelTypeInputSchema(): ZodObject<Properties<SetChannelTypeInput>>;
declare function SetChannelVisibilityInputSchema(): ZodObject<Properties<SetChannelVisibilityInput>>;
declare function UpdateParticipantRoleInputSchema(): ZodObject<Properties<UpdateParticipantRoleInput>>;
//#endregion
//#region document-models/channel/v1/gen/document-type.d.ts
declare const channelDocumentType = "powerchat/channel";
//#endregion
//#region document-models/channel/v1/gen/document-schema.d.ts
/** Schema for validating the header object of a Channel document */
declare const ChannelDocumentHeaderSchema: ZodObject<{
  id: ZodString;
  name: ZodString;
  createdAtUtcIso: ZodString;
  lastModifiedAtUtcIso: ZodString;
  documentType: ZodLiteral<"powerchat/channel">;
}, $strip>;
/** Schema for validating the state object of a Channel document */
declare const ChannelPHStateSchema: ZodObject<{
  global: ZodObject<Required<{
    channelType: ZodType<ChannelType, unknown, $ZodTypeInternals<ChannelType, unknown>>;
    description: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
    name: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
    participants: ZodType<Participant[], unknown, $ZodTypeInternals<Participant[], unknown>>;
    topic: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
    visibility: ZodType<ChannelVisibility, unknown, $ZodTypeInternals<ChannelVisibility, unknown>>;
  }>, $strip>;
}, $strip>;
declare const ChannelDocumentSchema: ZodObject<{
  header: ZodObject<{
    id: ZodString;
    name: ZodString;
    createdAtUtcIso: ZodString;
    lastModifiedAtUtcIso: ZodString;
    documentType: ZodLiteral<"powerchat/channel">;
  }, $strip>;
  state: ZodObject<{
    global: ZodObject<Required<{
      channelType: ZodType<ChannelType, unknown, $ZodTypeInternals<ChannelType, unknown>>;
      description: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      name: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      participants: ZodType<Participant[], unknown, $ZodTypeInternals<Participant[], unknown>>;
      topic: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      visibility: ZodType<ChannelVisibility, unknown, $ZodTypeInternals<ChannelVisibility, unknown>>;
    }>, $strip>;
  }, $strip>;
  initialState: ZodObject<{
    global: ZodObject<Required<{
      channelType: ZodType<ChannelType, unknown, $ZodTypeInternals<ChannelType, unknown>>;
      description: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      name: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      participants: ZodType<Participant[], unknown, $ZodTypeInternals<Participant[], unknown>>;
      topic: ZodType<Maybe<string>, unknown, $ZodTypeInternals<Maybe<string>, unknown>>;
      visibility: ZodType<ChannelVisibility, unknown, $ZodTypeInternals<ChannelVisibility, unknown>>;
    }>, $strip>;
  }, $strip>;
}, $strip>;
/** Simple helper function to check if a state object is a Channel document state object */
declare function isChannelState(state: unknown): state is ChannelPHState;
/** Simple helper function to assert that a document state object is a Channel document state object */
declare function assertIsChannelState(state: unknown): asserts state is ChannelPHState;
/** Simple helper function to check if a document is a Channel document */
declare function isChannelDocument(document: unknown): document is ChannelDocument;
/** Simple helper function to assert that a document is a Channel document */
declare function assertIsChannelDocument(document: unknown): asserts document is ChannelDocument;
//#endregion
//#region document-models/channel/v1/gen/channel/operations.d.ts
interface ChannelChannelOperations {
  setChannelNameOperation: (state: ChannelState, action: SetChannelNameAction, dispatch?: SignalDispatch) => void;
  setChannelDescriptionOperation: (state: ChannelState, action: SetChannelDescriptionAction, dispatch?: SignalDispatch) => void;
  setChannelVisibilityOperation: (state: ChannelState, action: SetChannelVisibilityAction, dispatch?: SignalDispatch) => void;
  setChannelTopicOperation: (state: ChannelState, action: SetChannelTopicAction, dispatch?: SignalDispatch) => void;
  setChannelTypeOperation: (state: ChannelState, action: SetChannelTypeAction, dispatch?: SignalDispatch) => void;
}
//#endregion
//#region document-models/channel/v1/gen/participants/operations.d.ts
interface ChannelParticipantsOperations {
  addParticipantOperation: (state: ChannelState, action: AddParticipantAction, dispatch?: SignalDispatch) => void;
  removeParticipantOperation: (state: ChannelState, action: RemoveParticipantAction, dispatch?: SignalDispatch) => void;
  updateParticipantRoleOperation: (state: ChannelState, action: UpdateParticipantRoleAction, dispatch?: SignalDispatch) => void;
}
//#endregion
//#region document-models/channel/v1/hooks.d.ts
/** Hook to get a Channel document by its id */
declare function useChannelDocumentById(documentId: string | null | undefined): [ChannelDocument, DocumentDispatch<ChannelAction>] | [undefined, undefined];
/** Hook to get the selected Channel document */
declare function useSelectedChannelDocument(): [ChannelDocument, DocumentDispatch<ChannelAction>];
/** Hook to get all Channel documents in the selected drive */
declare function useChannelDocumentsInSelectedDrive(): ChannelDocument[] | undefined;
/** Hook to get all Channel documents in the selected folder */
declare function useChannelDocumentsInSelectedFolder(): ChannelDocument[] | undefined;
//#endregion
//#region document-models/channel/v1/actions.d.ts
/** Actions for the Channel document model */
declare const actions: {
  addParticipant: (input: AddParticipantInput) => AddParticipantAction;
  removeParticipant: (input: RemoveParticipantInput) => RemoveParticipantAction;
  updateParticipantRole: (input: UpdateParticipantRoleInput) => UpdateParticipantRoleAction;
  setChannelName: (input: SetChannelNameInput) => SetChannelNameAction;
  setChannelDescription: (input: SetChannelDescriptionInput) => SetChannelDescriptionAction;
  setChannelVisibility: (input: SetChannelVisibilityInput) => SetChannelVisibilityAction;
  setChannelTopic: (input: SetChannelTopicInput) => SetChannelTopicAction;
  setChannelType: (input: SetChannelTypeInput) => SetChannelTypeAction;
  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/channel/v1/utils.d.ts
/** Utils for the Channel document model */
declare const utils: DocumentModelUtils<ChannelPHState>;
//#endregion
//#region document-models/channel/upgrades/versions.d.ts
declare const supportedVersions: readonly [1];
declare const latestVersion: 1;
//#endregion
//#region document-models/channel/upgrades/upgrade-manifest.d.ts
declare const channelUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
//#endregion
export { AddParticipantAction, AddParticipantInput, AddParticipantInputSchema, ChannelAction, ChannelChannelAction, ChannelChannelOperations, ChannelController, ChannelDocument, ChannelDocumentHeaderSchema, ChannelDocumentSchema, ChannelState as ChannelGlobalState, ChannelState, ChannelLocalState, ChannelPHState, ChannelPHStateSchema, ChannelParticipantsAction, ChannelParticipantsOperations, ChannelStateSchema, ChannelType, ChannelTypeSchema, ChannelVisibility, ChannelVisibilitySchema, Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Participant, ParticipantRole, ParticipantRoleSchema, ParticipantSchema, RemoveParticipantAction, RemoveParticipantInput, RemoveParticipantInputSchema, Scalars, SetChannelDescriptionAction, SetChannelDescriptionInput, SetChannelDescriptionInputSchema, SetChannelNameAction, SetChannelNameInput, SetChannelNameInputSchema, SetChannelTopicAction, SetChannelTopicInput, SetChannelTopicInputSchema, SetChannelTypeAction, SetChannelTypeInput, SetChannelTypeInputSchema, SetChannelVisibilityAction, SetChannelVisibilityInput, SetChannelVisibilityInputSchema, UpdateParticipantRoleAction, UpdateParticipantRoleInput, UpdateParticipantRoleInputSchema, actions, addParticipant, assertIsChannelDocument, assertIsChannelState, creators_d_exports as channelChannelActions, channelDocumentType, creators_d_exports$1 as channelParticipantsActions, channelUpgradeManifest, createChannelDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isChannelDocument, isChannelState, isDefinedNonNullAny, latestVersion, reducer, removeParticipant, setChannelDescription, setChannelName, setChannelTopic, setChannelType, setChannelVisibility, supportedVersions, updateParticipantRole, useChannelDocumentById, useChannelDocumentsInSelectedDrive, useChannelDocumentsInSelectedFolder, useSelectedChannelDocument, utils };
//# sourceMappingURL=index.d.ts.map