import{j as r,B as l}from"./index-60a3c753.js";import{R as p}from"./componentStyles-7753bbb9.js";import{C as x}from"./index.esm-c494934a.js";/* empty css                   */import{I as h}from"./InputLabel-71dfc9d4.js";const v=({control:n,name:e,overrideModule:a,label:c,onChange:o,required:d,styles:m})=>{const u={toolbar:[[{font:[]},{size:[]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{script:"super"},{script:"sub"}],[{header:[!1,1,2,3,4,5,6]},"blockquote","code-block"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"}],["direction",{align:[]}],["link","image","video"],["clean"]],...a};return r.jsx(l,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:r.jsx(x,{name:e,control:n,render:({field:t,fieldState:s})=>r.jsxs(l,{children:[r.jsx(h,{sx:{".MuiInputLabel-asterisk":{color:"red"}},required:d,htmlFor:e,style:{fontWeight:"medium"},error:s.error!=null,children:c}),r.jsx(p,{modules:u,theme:"snow",value:t.value||"",onChange:i=>{o&&o(i),t.onChange(i)},className:`${s.error?"editor-error":""}`,style:{height:"200px",marginBottom:"50px",...m}})]})})})};export{v as E};
