import React from "react";
import {
  action,
  createRicosComponentStory
} from "./../../wix-rich-content-common/create-ricos-component-story.js";
import { PromptInputArea } from "./prompt-input-area.js";
const template = ({
  value: initialValue,
  forceMultiline,
  minHeight,
  attachments: attachments2,
  busy,
  readonly,
  fileUploadFn
} = {
  value: "",
  attachments: [],
  busy: false,
  readonly: false
}) => (storyProps) => {
  const [value, setValue] = React.useState(initialValue);
  return createRicosComponentStory({
    component: /* @__PURE__ */ React.createElement("div", { style: { maxWidth: "650px" } }, /* @__PURE__ */ React.createElement(
      PromptInputArea,
      {
        maxLength: 1e3,
        onChange: (data) => {
          setValue(data);
        },
        onSubmit: action("onSubmit"),
        value,
        onCancel: action("onCancel"),
        zIndex: 0,
        dataHook: "prompt-input-area",
        forceMultiline,
        minHeight,
        attachments: attachments2,
        busy,
        readonly,
        fileUploadFn
      }
    )),
    storyProps
  });
};
const attachments = [
  {
    status: "ok",
    id: "1",
    file: {
      name: "image.jpg",
      type: "jpg",
      url: "https://static.wixstatic.com/media/8bb438_0660e79effa64f8ea139c4fc03e0b773.jpg"
    }
  },
  {
    status: "ok",
    id: "2",
    file: {
      name: "Document",
      type: "text",
      url: ""
    }
  }
];
const Default = template();
const AllowFileUpload = template({
  value: "",
  fileUploadFn: async () => {
    return Promise.resolve();
  }
});
const Busy = template({
  value: "",
  busy: true
});
const Readonly = template({
  value: "",
  readonly: true
});
const ReadonlyAndBusy = template({
  value: "",
  readonly: true,
  busy: true
});
const ReadonlyAndDisabled = template({
  value: "",
  readonly: true
});
const WithText = template({
  value: "create me a blog post"
});
const WithMultilineText = template({
  value: "1 \n2 \n3 \n4 \n5 \n6 \n7 \n8 \n9 \n10"
});
const ForceMultiline = template({
  value: "",
  forceMultiline: true
});
const ForceMultilineWithCustomHeight = template({
  value: "",
  forceMultiline: true,
  minHeight: "33px"
});
const ForceMultilineWithText = template({
  value: "create me a blog post",
  forceMultiline: true,
  minHeight: "170px"
});
const WithAttachments = template({
  value: "",
  attachments,
  fileUploadFn: async () => {
    return Promise.resolve();
  }
});
const Full = template({
  value: "",
  attachments,
  fileUploadFn: async () => {
    return Promise.resolve();
  }
});
var prompt_input_area_stories_default = {
  name: "PromptInputArea"
};
export {
  AllowFileUpload,
  Busy,
  Default,
  ForceMultiline,
  ForceMultilineWithCustomHeight,
  ForceMultilineWithText,
  Full,
  Readonly,
  ReadonlyAndBusy,
  ReadonlyAndDisabled,
  WithAttachments,
  WithMultilineText,
  WithText,
  prompt_input_area_stories_default as default
};
//# sourceMappingURL=prompt-input-area.stories.js.map
