(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{99186:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media/[...folder]",function(){return t(52691)}])},99862:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(74848);t(96540);var l=t(86625);function r(){return(0,a.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,a.jsx)(l.A,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},86625:(e,s,t)=>{"use strict";var a=t(24994);s.A=void 0;var l=a(t(44888)),r=t(74848);s.A=(0,l.default)((0,r.jsx)("path",{d:"M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76"}),"ArrowBackIosRounded")},52691:(e,s,t)=>{"use strict";t.r(s),t.d(s,{MediaContext:()=>y,__N_SSP:()=>g,default:()=>_});var a=t(74848),l=t(96540),r=t(51187),i=t(67764),n=t(45332),d=t(84003),o=t(5531),c=t(99862),u=t(4709),x=t(45165),j=t(55624),p=t(53301),h=t(60557),m=t(96228);function f(e){var s;let{media:t,setTargetMedia:r,user:i,folders:n,query:d,staticHost:o,folder:f}=l.useContext(y);return(0,a.jsxs)(l.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,a.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.A,{}),(0,a.jsx)(m.A,{className:"opacity-40"}),(0,a.jsx)("h1",{className:"text-3xl m-0",children:d.folder[d.folder.length-1]})]}),(0,a.jsxs)(h.A,{children:[(0,a.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,x.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Media"})]}),(0,a.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,x.PB)("add-folder-popoup",e=>{var s;null==e||null===(s=e.querySelector("input"))||void 0===s||s.focus()})},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Folder"})]})]})]}),(0,a.jsx)(u.A,{user:i})]}),(null==i?void 0:null===(s=i.verification_status)||void 0===s?void 0:s.toString().match(/1/))?(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(p.A,{media:t,setTargetMedia:r,folders:n,folder:f,staticHost:o,user:i}),t&&t[0]&&(0,a.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,x.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,a.jsx)(j.A,{})]})}var N=t(11493),w=t(65001),A=t(620),v=t(22154),g=!0;let y=l.createContext({});function _(e){let{user:s,media:t,folders:c,query:u,staticHost:x,folderNameFull:j}=e,p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[h,m]=l.useState(null),[g,_]=l.useState(null),[b,k]=l.useState(null),[M,S]=l.useState(!1),[C,F]=l.useState(null);return(0,a.jsx)(r.A,{head:p,user:s,children:(0,a.jsxs)(y.Provider,{value:{user:s,media:t,targetMedia:C,setTargetMedia:F,folders:c,query:u,staticHost:x,folder:j},children:[M&&(0,a.jsx)(A.A,{screen:!0,title:"Processing Files ..."}),(0,a.jsx)(f,{}),(0,a.jsx)(i.A,{setNewMedia:m,setLoading:S}),(0,a.jsx)(N.A,{setNewFile:_,setLoading:S}),(0,a.jsx)(v.A,{setNewVideo:k,setLoading:S}),(0,a.jsx)(n.A,{newMedia:h,setNewMedia:m,newFile:g,setNewFile:_,folder:j,newVideo:b,setNewVideo:k}),(0,a.jsx)(d.A,{targetMedia:C,staticHost:x,setTargetMedia:F,media:t}),(0,a.jsx)(o.A,{folder:j}),(0,a.jsx)(w.A,{user:s})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[9799,4750,636,6593,8792],()=>s(99186)),_N_E=e.O()}]);