import { jsxs as o, jsx as t } from "react/jsx-runtime";
import { Dropzone as p } from "../_dropzone/index.js";
import { Button as f } from "../button/index.js";
import { Form as d } from "../form/index.js";
import { Icon as u } from "../icon/index.js";
import { List as h } from "../list/index.js";
import { Textarea as v } from "../textarea/index.js";
import { Message as _ } from "../message/index.js";
import '../../assets/index22.css';const b = "_messages_143n4_1", g = "_controls_143n4_23", i = {
  messages: b,
  controls: g
}, w = ({
  handleUpload: n,
  message: e,
  messages: s,
  onChange: a,
  onSubmit: m,
  placeholder: l,
  sending: c
}) => /* @__PURE__ */ o("div", { className: i.messages, "data-component": "messages", children: [
  /* @__PURE__ */ t(h, { children: s.map((r) => /* @__PURE__ */ t(_, { ...r }, r.id)) }),
  /* @__PURE__ */ o(d, { onSubmit: (r) => {
    r.preventDefault(), m();
  }, children: [
    /* @__PURE__ */ t(v, { onChange: a, placeholder: l, value: e }),
    /* @__PURE__ */ o("div", { className: i.controls, children: [
      /* @__PURE__ */ t(p, { label: "", multiple: !0, onChange: (r) => {
        r.currentTarget.files && n(r.currentTarget.files);
      }, variant: "minimal" }),
      /* @__PURE__ */ t(f, { "aria-label": "Send message", disabled: c || !(e != null && e.trim()), type: "submit", variant: "primary", children: /* @__PURE__ */ t(u, { fill: !0, name: "plane", variant: "white" }) })
    ] })
  ] })
] });
export {
  w as Messages
};
//# sourceMappingURL=index.js.map
