{"version":3,"file":"store.mjs","names":[],"sources":["../../../../../src/plugins/AIComponents/AIMessageComposer/store.ts"],"sourcesContent":["import { StateStore } from '@stream-io/state-store';\n\nimport type { AIChatOption } from './ChatOptions';\n\nexport type AIMessageComposerStore = {\n  attachments: {\n    file: File;\n    id: string;\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any -- public type kept identical to @stream-io/chat-react-ai@0.2.0 for drop-in migration\n    meta?: Record<string, any>;\n  }[];\n  text: string;\n  /**\n   * The chat option picked for the next message, which `AIMessageComposer.ChatOptions` shows. It\n   * stays picked after a message is sent.\n   */\n  chatOption?: AIChatOption | null;\n  /** Data of your own, which an `AIConversationController` sends with the message as `custom`. */\n  custom?: Record<string, unknown>;\n  disabled?: boolean;\n  /**\n   * Whether the person is editing a message they sent. The composer says so above the text,\n   * with a button that cancels it, and focuses the text input.\n   */\n  isEditing?: boolean;\n};\n\nexport const initialAIMessageComposerState: AIMessageComposerStore = {\n  attachments: [],\n  disabled: false,\n  text: '',\n};\n\n/** A store for what the person writes in an `AIMessageComposer`, such as for a conversation. */\nexport const createAIMessageComposerStore = () =>\n  new StateStore<AIMessageComposerStore>(initialAIMessageComposerState);\n"],"mappings":";;AA2BA,IAAa,gCAAwD;CACnE,aAAa,CAAC;CACd,UAAU;CACV,MAAM;AACR;;AAGA,IAAa,qCACX,IAAI,WAAmC,6BAA6B"}