import{q as B,j as e,r as a,d as s}from"./index-76f1ce5c.js";import{R as n,C as o,d as t,I as g}from"./iconBase-883829c2.js";import{D as J}from"./index-a0cf5c09.js";import{D as p}from"./person-0b52ed1d.js";import{l as r}from"./index-0f01bb7e.js";import{T as L}from"./tabs-8bdf8fba.js";import"./index-31a0332c.js";function H({intl:F}){const{messages:G}=F,O=({onSend:b,setOnSend:R,onReset:N,setOnReset:$,tab:i,active:c})=>{const[d,m]=a.useState(null),[C,u]=a.useState(p),[v,E]=a.useState(""),[I,x]=a.useState(""),[S,q]=a.useState(""),[z,T]=a.useState(""),[w,j]=a.useState(""),[y,M]=a.useState([]),h=r.Quill.import("formats/font");h.whitelist=["open"],r.Quill.register(h,!0);const D={toolbar:[[{font:h.whitelist}],[{size:[]}],["bold","italic","underline","strike","blockquote","headers"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{header:"3"}],["clean"]]},k=["font","size","header","bold","headers","italic","underline","strike","blockquote","list","bullet","indent"];function Q(){console.log({image:C,about:w,phone:v,email:I,ceoName:S,ceo:z},i)}function U(){P(),m(null),u(p),E(""),x(""),j(""),T(""),q(""),console.log("reset",i)}a.useEffect(()=>{N&&c&&(U(),$(!1))},[N]),a.useEffect(()=>{b&&c&&(Q(),R(!1))},[b]);function P(){function l(_){const f=document.getElementsByClassName("dz-message");if(_.length>0){const A=i=="pt-br"?0:1;d&&c?f[A].innerText=`A imagem "${d.name}" já foi carregada com sucesso!
    Clique aqui para substituí-la `:f[A].innerText=`
    Tipo de imagem aceita: JPEG ou PNG
    `}else setTimeout(()=>{M(f)},100)}l(y)}return a.useEffect(()=>{P()},[y,i]),s("div",{children:[s(n,{children:[e("div",{className:"col-auto miniature ml-3",children:s("div",{className:"has-float-label",children:[e("label",{children:"Imagem do CEO"}),e("img",{src:C,alt:"imagem de perfil"})]})}),e(o,{className:"col-dropzone",children:e(t,{children:e(J,{scrollingContainer:".parent-scroll",id:"photo",name:"photo",addImage:l=>{m(l),u(l.dataURL)},removeImage:()=>{m(null),u(p)},images:d})})})]}),s(n,{children:[e(o,{className:"col-6",children:e(t,{children:s("div",{className:"has-float-label",children:[e("label",{children:"Telefone"}),e(g,{value:v,onChange:l=>E(l.target.value)})]})})}),e(o,{className:"col-6",children:e(t,{children:s("div",{className:"has-float-label",children:[e("label",{children:"Email "}),e(g,{type:"email",value:I,onChange:l=>x(l.target.value)})]})})})]}),e(n,{children:e(o,{className:"col-12",children:e(t,{children:s("div",{className:"has-float-label",children:[e("label",{children:"Nome CEO"}),e(g,{type:"ceo-name",value:S,onChange:l=>q(l.target.value)})]})})})}),e(n,{children:e(o,{className:"col-12",children:e(t,{children:s("div",{className:"has-float-label",children:[e("label",{children:"CEO"}),e(r,{placeholder:"Informe a descrição...",theme:"snow",value:z,onChange:l=>T(l),modules:D,formats:k})]})})})}),e(n,{children:e(o,{className:"col-12",children:e(t,{children:s("div",{className:"has-float-label",children:[e("label",{children:"Sobre"}),e(r,{placeholder:"Informe a descrição...",theme:"snow",value:w,onChange:l=>j(l),modules:D,formats:k})]})})})})]})};return e(L,{title:G["sidebar.about"],Component:O})}const le=B(H);export{le as default};
