1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6558],{3010:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/panel-videos/components/ModalEditVideo",function(){return a(2383)}])},2383:function(e,t,a){"use strict";a.r(t);var r=a(1527),l=a(959),s=a(7150),o=a(6511),n=a(726),d=a(4810),i=a(2459),c=a(6565);let u=e=>{let{openModal:t,handleCloseModal:a,actualPage:u,setVideos:m}=e,b=(0,l.useRef)(null),[h,x]=(0,l.useState)(!1),[f,g]=(0,l.useState)({id_video:"",titulo:"",url:"",fecha:"",prioridad:""}),p=e=>{g({...f,[e.target.name]:e.target.value})},y=async e=>{e.preventDefault(),await (0,c.HH)(f.id_video,{...f,fecha:f.fecha.split("-").join("")});let t=await (0,c.WY)(u);m(t),a()},w=(0,o.v9)(e=>{let{videos:t}=e;return t.videoUpdate}),v=e=>{e.stopPropagation()},j=e=>{b.current.scrollTop=0,x(!0)};return(0,l.useEffect)(()=>{g(w)},[w]),(0,r.jsx)("div",{children:(0,r.jsx)(s.Z,{open:t,onClose:a,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",BackdropProps:{onClick:v},children:(0,r.jsxs)("div",{className:!0===h?"overflow-y-hidden absolute top-1/2 left-1/2 -translate-x-1/2 bg-white shadow-lg -translate-y-1/2 w-2/3 md:w-2/3 h-5/6 p-11 rounded-xl":"absolute top-1/2 left-1/2 -translate-x-1/2 bg-white shadow-lg -translate-y-1/2 w-2/3 md:w-2/3 h-5/6 p-11 rounded-xl overflow-y-auto",ref:b,children:[(0,r.jsx)("div",{className:!0===h?"":"hidden",children:(0,r.jsx)(i.Z,{seccion:"video"})}),(0,r.jsxs)("div",{className:"flex justify-between items-center mb-8 pb-3",children:[(0,r.jsx)("h5",{className:"text-lg font-semibold",children:"Editar un video"}),(0,r.jsx)("button",{onClick:()=>a(),children:(0,r.jsx)(n.Z,{})})]}),(0,r.jsxs)("form",{onSubmit:y,children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("label",{htmlFor:"titulo",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Titulo"}),(0,r.jsx)("input",{type:"text",id:"titulo",onChange:p,value:null==f?void 0:f.titulo,name:"titulo",className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("label",{htmlFor:"url",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"URL"}),(0,r.jsx)("input",{type:"text",id:"url",onChange:p,name:"url",value:null==f?void 0:f.url,className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("label",{htmlFor:"fecha",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Fecha"}),(0,r.jsx)("input",{id:"fecha",type:"date",onChange:p,value:null==f?void 0:f.fecha,name:"fecha",className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap flex-row",children:[(0,r.jsx)(d.zx,{type:"submit",onClick:j,children:"Guardar"}),(0,r.jsx)(d.zx,{color:"gray",className:"ml-3",onClick:a,children:"Cancelar"})]})]})]})})})};t.default=u},2459:function(e,t,a){"use strict";var r=a(1527);let l=e=>{let{seccion:t}=e;return(0,r.jsx)("div",{className:"z-50 absolute h-[68rem] left-0 top-0 bg-black bg-opacity-40 w-full",children:(0,r.jsxs)("div",{className:"flex flex-col items-center mt-32 ",children:[(0,r.jsx)("div",{children:(0,r.jsx)("img",{src:"/logot.png",alt:"",className:"w-96 animate-spin-slow"})}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"py-2 px-5 rounded-lg flex items-center flex-col",children:[(0,r.jsxs)("div",{className:"loader-dots block relative w-20 h-5 mt-2",children:[(0,r.jsx)("div",{className:"absolute top-0 mt-1 w-3 h-3 rounded-full bg-red-500"}),(0,r.jsx)("div",{className:"absolute top-0 mt-1 w-3 h-3 rounded-full bg-blue-500"}),(0,r.jsx)("div",{className:"absolute top-0 mt-1 w-3 h-3 rounded-full bg-yellow-500"}),(0,r.jsx)("div",{className:"absolute top-0 mt-1 w-3 h-3 rounded-full bg-green-500"})]}),(0,r.jsxs)("div",{className:"text-white font-semibold text-xl mt-2 text-center",children:["Cargando ",t,", por favor espere..."]})]})})]})})};t.Z=l},6565:function(e,t,a){"use strict";a.d(t,{BY:function(){return o},FM:function(){return i},HH:function(){return d},Ty:function(){return n},WY:function(){return s}});var r=a(5086);let l=r.Z.create({baseURL:"".concat("https://api-arzobispado-production.up.railway.app/
1api","/videos")}),s=async e=>{try{let t=await l.get("?page=".concat(e));return t.data}catch(a){return a.response}},o=async()=>{try{let e=await l.get("/count");return e.data}catch(t){return t.response}},n=async e=>{try{let t=localStorage.getItem("token"),a=await l.post("/",e,{headers:{authorization:t}});return a.data}catch(r){return r.response}},d=async(e,t)=>{try{let a=localStorage.getItem("token"),r=await l.put("/".concat(e),t,{headers:{authorization:a}});return r.data}catch(s){return s.response}},i=async e=>{try{let t=localStorage.getItem("token"),a=await l.delete("/".concat(e),{headers:{authorization:t}});return a.data}catch(r){return r.response}}}},function(e){e.O(0,[6977,3440,4810,5086,3259,9774,2888,179],function(){return e(e.s=3010)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.