{"version":3,"sources":["../src/components/chat/Popup.tsx"],"sourcesContent":["/**\n * <br/>\n * <img src=\"https://cdn.vn.ai/docs/vn-sdk/images/AiPopup.gif\" width=\"500\" />\n *\n * A chatbot popup component for the VN SDK framework. The component allows for a high degree\n * of customization through various props and custom CSS.\n *\n * See [AiSidebar](/reference/components/chat/AiSidebar) for a sidebar version of this component.\n *\n * ## Install Dependencies\n *\n * This component is part of the [@vn-sdk/react-ui](https://npmjs.com/package/@vn-sdk/react-ui) package.\n *\n * ```shell npm2yarn \\\"@vn-sdk/react-ui\"\\\n * npm install @vn-sdk/react-core @vn-sdk/react-ui\n * ```\n * ## Usage\n *\n * ```tsx\n * import { AiPopup } from \"@vn-sdk/react-ui\";\n * import \"@vn-sdk/react-ui/styles.css\";\n *\n * <AiPopup\n *   labels={{\n *     title: \"Your Assistant\",\n *     initial: \"Hi! 👋 How can I assist you today?\",\n *   }}\n * />\n * ```\n *\n * ### With Observability Hooks\n *\n * To monitor user interactions, provide the `observabilityHooks` prop.\n * **Note:** This requires a `publicApiKey` in the `<AiProvider>` provider.\n *\n * ```tsx\n * <VN SDK publicApiKey=\"YOUR_PUBLIC_API_KEY\">\n *   <AiPopup\n *     observabilityHooks={{\n *       onChatExpanded: () => {\n *         console.log(\"Popup opened\");\n *       },\n *       onChatMinimized: () => {\n *         console.log(\"Popup closed\");\n *       },\n *     }}\n *   />\n * </AiProvider>\n * ```\n *\n * ### Look & Feel\n *\n * By default, VN SDK components do not have any styles. You can import VN SDK's stylesheet at the root of your project:\n * ```tsx title=\"YourRootComponent.tsx\"\n * ...\n * import \"@vn-sdk/react-ui/styles.css\"; // [!code highlight]\n *\n * export function YourRootComponent() {\n *   return (\n *     <AiProvider>\n *       ...\n *     </AiProvider>\n *   );\n * }\n * ```\n * For more information about how to customize the styles, check out the [Customize Look & Feel](/guides/custom-look-and-feel/customize-built-in-ui-components) guide.\n */\n\nimport { AiModal, AiModalProps } from \"./Modal\";\n\nexport function AiPopup(props: AiModalProps) {\n  props = {\n    ...props,\n    className: props.className ? props.className + \" copilotKitPopup\" : \"copilotKitPopup\",\n  };\n  return <AiModal {...props}>{props.children}</AiModal>;\n}\n"],"mappings":";;;;;;;;;AA2ES;AALF,SAAS,QAAQ,OAAqB;AAC3C,UAAQ,iCACH,QADG;AAAA,IAEN,WAAW,MAAM,YAAY,MAAM,YAAY,qBAAqB;AAAA,EACtE;AACA,SAAO,oBAAC,0CAAY,QAAZ,EAAoB,gBAAM,WAAS;AAC7C;","names":[]}