"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index22.css');const e=require("react/jsx-runtime"),m=require("../_dropzone/index.cjs"),u=require("../button/index.cjs"),d=require("../form/index.cjs"),_=require("../icon/index.cjs"),x=require("../list/index.cjs"),p=require("../textarea/index.cjs"),j=require("../message/index.cjs"),g="_messages_143n4_1",b="_controls_143n4_23",t={messages:g,controls:b},q=({handleUpload:r,message:s,messages:o,onChange:i,onSubmit:a,placeholder:c,sending:l})=>e.jsxs("div",{className:t.messages,"data-component":"messages",children:[e.jsx(x.List,{children:o.map(n=>e.jsx(j.Message,{...n},n.id))}),e.jsxs(d.Form,{onSubmit:n=>{n.preventDefault(),a()},children:[e.jsx(p.Textarea,{onChange:i,placeholder:c,value:s}),e.jsxs("div",{className:t.controls,children:[e.jsx(m.Dropzone,{label:"",multiple:!0,onChange:n=>{n.currentTarget.files&&r(n.currentTarget.files)},variant:"minimal"}),e.jsx(u.Button,{"aria-label":"Send message",disabled:l||!(s!=null&&s.trim()),type:"submit",variant:"primary",children:e.jsx(_.Icon,{fill:!0,name:"plane",variant:"white"})})]})]})]});exports.Messages=q;
//# sourceMappingURL=index.cjs.map
