{"version":3,"file":"ChatInputArea.mjs","names":[],"sources":["../../../src/chat/ChatInputArea/ChatInputArea.tsx"],"sourcesContent":["'use client';\n\nimport { memo } from 'react';\n\nimport DraggablePanel from '@/DraggablePanel';\n\nimport ChatInputAreaInner from './components/ChatInputAreaInner';\nimport { styles } from './style';\nimport type { ChatInputAreaProps } from './type';\n\nconst ChatInputArea = memo<ChatInputAreaProps>(\n  ({\n    ref,\n    className,\n    style,\n    classNames,\n    expand = true,\n    setExpand,\n    bottomAddons,\n    topAddons,\n    onSizeChange,\n    heights,\n    onSend,\n    ...rest\n  }) => {\n    return (\n      <DraggablePanel\n        className={className}\n        classNames={classNames}\n        fullscreen={expand}\n        headerHeight={heights?.headerHeight}\n        maxHeight={heights?.maxHeight}\n        minHeight={heights?.minHeight}\n        placement=\"bottom\"\n        size={{ height: heights?.inputHeight, width: '100%' }}\n        style={{ zIndex: 10, ...style }}\n        onSizeChange={onSizeChange}\n      >\n        <section className={styles.container} style={{ minHeight: heights?.minHeight }}>\n          {topAddons}\n          <div className={styles.textareaContainer}>\n            <ChatInputAreaInner\n              className={styles.textarea}\n              ref={ref}\n              style={{\n                paddingInline: 16,\n              }}\n              onSend={() => {\n                onSend?.();\n                setExpand?.(false);\n              }}\n              {...rest}\n            />\n          </div>\n          {bottomAddons}\n        </section>\n      </DraggablePanel>\n    );\n  },\n);\n\nexport default ChatInputArea;\n"],"mappings":";;;;;;;AAUA,MAAM,gBAAgB,MACnB,EACC,KACA,WACA,OACA,YACA,SAAS,MACT,WACA,cACA,WACA,cACA,SACA,QACA,GAAG,WACC;AACJ,QACE,oBAAC,gBAAD;EACa;EACC;EACZ,YAAY;EACZ,cAAc,SAAS;EACvB,WAAW,SAAS;EACpB,WAAW,SAAS;EACpB,WAAU;EACV,MAAM;GAAE,QAAQ,SAAS;GAAa,OAAO;GAAQ;EACrD,OAAO;GAAE,QAAQ;GAAI,GAAG;GAAO;EACjB;YAEd,qBAAC,WAAD;GAAS,WAAW,OAAO;GAAW,OAAO,EAAE,WAAW,SAAS,WAAW;aAA9E;IACG;IACD,oBAAC,OAAD;KAAK,WAAW,OAAO;eACrB,oBAAC,oBAAD;MACE,WAAW,OAAO;MACb;MACL,OAAO,EACL,eAAe,IAChB;MACD,cAAc;AACZ,iBAAU;AACV,mBAAY,MAAM;;MAEpB,GAAI;MACJ,CAAA;KACE,CAAA;IACL;IACO;;EACK,CAAA;EAGtB"}