(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2759],{42065:function(e,s,t){"use strict";var r=t(64836);s.Z=void 0;var n=r(t(64938)),i=t(85893),a=(0,n.default)((0,i.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.76z"}),"ArrowBackIosRounded");s.Z=a},22139:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media/[...folder]",function(){return t(73947)}])},61781:function(e,s,t){"use strict";t.d(s,{Z:function(){return i}});var r=t(85893),n=(t(67294),t(42065));function i(){return(0,r.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:function(e){window.history.back()},children:(0,r.jsx)(n.Z,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},73947:function(e,s,t){"use strict";t.r(s),t.d(s,{MediaContext:function(){return b},__N_SSP:function(){return _},default:function(){return M}});var r=t(828),n=t(85893),i=t(67294),a=t(54858),l=t(73770),o=t(94891),d=t(1347),c=t(81597),u=t(61781),f=t(424),x=t(25472),j=t(97946),m=t(17244),p=t(45449),h=t(30212);function w(e){var s,t=i.useContext(b),r=t.media,a=t.setTargetMedia,l=t.user,o=t.folders,d=t.query,c=t.staticHost,w=t.folder;return(0,n.jsxs)(i.Fragment,{children:[(0,n.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,n.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(u.Z,{}),(0,n.jsx)(h.Z,{className:"opacity-40"}),(0,n.jsx)("h1",{className:"text-3xl m-0",children:d.folder[d.folder.length-1]})]}),(0,n.jsxs)(p.Z,{children:[(0,n.jsxs)("button",{className:"flex items-center gap-2",onClick:function(e){(0,x.Mw)("choose-media-type-popoup")},children:[(0,n.jsx)("span",{className:"symbol",children:"+"}),(0,n.jsx)("span",{children:"Add Media"})]}),(0,n.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:function(e){(0,x.Mw)("add-folder-popoup",(function(e){var s;null===(s=null===e||void 0===e?void 0:e.querySelector("input"))||void 0===s||s.focus()}))},children:[(0,n.jsx)("span",{className:"symbol",children:"+"}),(0,n.jsx)("span",{children:"Add Folder"})]})]})]}),(0,n.jsx)(f.Z,{user:l})]}),(null===l||void 0===l||null===(s=l.verification_status)||void 0===s?void 0:s.toString().match(/1/))?(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)(m.Z,{media:r,setTargetMedia:a,folders:o,folder:w,staticHost:c,user:l}),r&&r[0]&&(0,n.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:function(e){(0,x.Mw)("choose-media-type-popoup")},children:[(0,n.jsx)("span",{className:"symbol",children:"+"}),(0,n.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,n.jsx)(j.Z,{})]})}var N=t(98916),v=t(62588),Z=t(95264),g=t(37525),y={},_=!0,b=i.createContext(y);function M(e){var s=e.user,t=e.media,u=e.folders,f=e.query,x=e.staticHost,j=e.folderNameFull,m=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,n.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),p=(0,r.Z)(i.useState(null),2),h=p[0],y=p[1],_=(0,r.Z)(i.useState(null),2),M=_[0],k=_[1],S=(0,r.Z)(i.useState(null),2),C=S[0],F=S[1],T=(0,r.Z)(i.useState(!1),2),q=T[0],E=T[1],H=(0,r.Z)(i.useState(null),2),L=H[0],P=H[1];return(0,n.jsx)(a.Z,{head:m,user:s,children:(0,n.jsxs)(b.Provider,{value:{user:s,media:t,targetMedia:L,setTargetMedia:P,folders:u,query:f,staticHost:x,folder:j},children:[q&&(0,n.jsx)(Z.Z,{screen:!0,title:"Processing Files ..."}),(0,n.jsx)(w,{}),(0,n.jsx)(l.Z,{setNewMedia:y,setLoading:E}),(0,n.jsx)(N.Z,{setNewFile:k,setLoading:E}),(0,n.jsx)(g.Z,{setNewVideo:F,setLoading:E}),(0,n.jsx)(o.Z,{newMedia:h,setNewMedia:y,newFile:M,setNewFile:k,folder:j,newVideo:C,setNewVideo:F}),(0,n.jsx)(d.Z,{targetMedia:L,staticHost:x,setTargetMedia:P,media:t}),(0,n.jsx)(c.Z,{folder:j}),(0,n.jsx)(v.Z,{user:s})]})})}}},function(e){e.O(0,[9365,4156,9774,2888,179],(function(){return s=22139,e(e.s=s);var s}));var s=e.O();_N_E=s}]);