import{r as p,S as h,j as e,a as g}from"./app-BZJf8lgN.js";import{L as j}from"./layout-DZ5xjWdd.js";import{I as c}from"./inputtext.esm-B1lZn37a.js";import{P as f,F as s}from"./fileupload.esm-CWt4e-Qk.js";import{C as n}from"./CustomCKEditor-BpmNiC9B.js";import{I as l}from"./InputLabel-Dd3VnoK3.js";import{I as m}from"./image.esm-DhzuK4QZ.js";import{T as N}from"./toast.esm-CYGIlaDH.js";import{B as b}from"./button.esm-D_cwsnQR.js";import"./hooks.esm-UVLztt_0.js";import"./CSSTransition-DBuKQJwM.js";import"./index.esm-Ckth6fI3.js";import"./index.esm-hRnQzR_k.js";import"./csstransition.esm-BNRxTMOa.js";import"./index.esm-CygY3Qsw.js";import"./index.esm-B5zYYMSp.js";const z=({nosotros:o})=>{const x=p.useRef(null),{data:i,setData:a,post:d,processing:r,reset:u}=h({titulo:o.titulo,texto:o.texto,imagenFile:o.imagen,icon1File:o.icono1,titulo_icon_1:o.titulo_icon_1,texto_icon_1:o.texto_icon_1,icon2File:o.icono2,titulo_icon_2:o.titulo_icon_2,texto_icon_2:o.texto_icon_2,icon3File:o.icono3,titulo_icon_3:o.titulo_icon_3,texto_icon_3:o.texto_icon_3}),_=t=>{t.preventDefault(),d(route("nosotros.update",{_method:"put"}),{onSuccess:()=>{x.current.show({severity:"success",summary:"Exito",detail:"Contenido Actualizado",life:3e3}),u(),a({titulo:i.titulo,texto:i.texto,imagenFile:i.imagen,icon1File:i.icono1,titulo_icon_1:i.titulo_icon_1,texto_icon_1:i.texto_icon_1,icon2File:i.icono2,titulo_icon_2:i.titulo_icon_2,texto_icon_2:i.texto_icon_2,icon3File:i.icono3,titulo_icon_3:i.titulo_icon_3,texto_icon_3:i.texto_icon_3})}})};return e.jsxs(j,{children:[r&&e.jsxs(f,{value:r.percentage,max:"100",children:[r.percentage,"%"]}),e.jsx(g,{title:"Editar Nosotros"}),e.jsx("div",{className:"grid",children:e.jsx("div",{className:"col-12",children:e.jsxs("div",{className:"card",children:[e.jsx(N,{ref:x}),e.jsxs("section",{className:"max-w-xl",children:[e.jsxs("header",{children:[e.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Editar Nosotros"}),e.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Editar Contenido de Nosotros."})]}),e.jsxs("form",{className:"mt-4 space-y-6",onSubmit:_,encType:"multipart/form-data",children:[e.jsx(l,{children:"Titulo"}),e.jsx(c,{id:"title",name:"title",placeholder:"Titulo",className:"w-full mb-4",value:i.titulo,onChange:t=>a("titulo",t.target.value)}),e.jsx(l,{children:"Texto"}),e.jsx(n,{data:i.texto||"",onChange:t=>a("texto",t),placeholder:"Escribe aquí..."}),e.jsx(m,{src:o.imagen,alt:"Image",width:"450"}),e.jsx(l,{style:{margin:"20px 0px"},children:"Resolucion recomendada 667px * 568px"}),e.jsx(s,{mode:"basic",name:"img",className:"mt-3",accept:"image/*",chooseLabel:"Subir Imagen",onSelect:t=>a("imagenFile",t.files[0])}),e.jsxs("div",{className:"grid mt-3",children:[e.jsxs("div",{className:"col-4",children:[e.jsx(m,{src:o.icono1,alt:"Image",width:"60"}),e.jsx(s,{mode:"basic",name:"img",className:"mt-3",accept:"image/*",chooseLabel:"Subir Imagen",onSelect:t=>a("icon1File",t.files[0])}),e.jsx(l,{style:{margin:"20px 0px"},children:"Resolucion recomendada 60px * 60px"}),e.jsx(l,{children:"Titulo"}),e.jsx(c,{id:"title",name:"title",placeholder:"Titulo",className:"w-full",value:i.titulo_icon_1,onChange:t=>a("titulo_icon_1",t.target.value)}),e.jsx(l,{children:"Texto"}),e.jsx(n,{data:i.texto_icon_1||"",onChange:t=>a("texto_icon_1",t),placeholder:"Escribe aquí..."})]}),e.jsxs("div",{className:"col-4",children:[e.jsx(m,{src:o.icono2,alt:"Image",width:"60"}),e.jsx(s,{mode:"basic",name:"img",className:"mt-3",accept:"image/*",chooseLabel:"Subir Imagen",onSelect:t=>a("icon2File",t.files[0])}),e.jsx(l,{style:{margin:"20px 0px"},children:"Resolucion recomendada 60px * 60px"}),e.jsx(l,{children:"Titulo"}),e.jsx(c,{id:"title",name:"title",placeholder:"Titulo",className:"w-full",value:i.titulo_icon_2,onChange:t=>a("titulo_icon_2",t.target.value)}),e.jsx(l,{children:"Texto"}),e.jsx(n,{data:i.texto_icon_2||"",onChange:t=>a("texto_icon_2",t),placeholder:"Escribe aquí..."})]}),e.jsxs("div",{className:"col-4",children:[e.jsx(m,{src:o.icono3,alt:"Image",width:"60"}),e.jsx(s,{mode:"basic",name:"img",className:"mt-3",accept:"image/*",chooseLabel:"Subir Imagen",onSelect:t=>a("icon3File",t.files[0])}),e.jsx(l,{style:{margin:"20px 0px"},children:"Resolucion recomendada 60px * 60px"}),e.jsx(l,{children:"Titulo"}),e.jsx(c,{id:"title",name:"title",placeholder:"Titulo",className:"w-full",value:i.titulo_icon_3,onChange:t=>a("titulo_icon_3",t.target.value)}),e.jsx(l,{children:"Texto"}),e.jsx(n,{data:i.texto_icon_3||"",onChange:t=>a("texto_icon_3",t),placeholder:"Escribe aquí..."})]})]}),e.jsx(b,{className:"mt-5",style:{display:"block",margin:"auto"},type:"submit",children:"Modificar"})]})]})]})})})]})};export{z as default};
//# sourceMappingURL=Nosotros-DWtxbMYp.js.map
