"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5165],{557:(e,t,a)=>{a.d(t,{A:()=>d});var s=a(4848),l=a(6540);function d(e){let{children:t,column:a,className:d}=e,i=l.useRef();return l.useEffect(()=>{try{let e=i.current.childNodes,t=Array.from(e);if((null==t?void 0:t.length)===1)return;t.forEach((e,s)=>{let l=e;if(l.classList.contains("dropdown-wrapper")){let t=Array.from(e.childNodes).filter(e=>{var t;return(null==e?void 0:null===(t=e.nodeName)||void 0===t?void 0:t.match(/button/i))||e.classList.contains("button")});t&&t[0]&&(l=t[0])}s0&&(l.style[a?"borderTop":"borderLeft"]="none",l.style[a?"borderTopRightRadius":"borderTopLeftRadius"]=0,l.style[a?"borderTopLeftRadius":"borderBottomLeftRadius"]=0)})}catch(e){console.log(e.message)}},[]),(0,s.jsx)("div",{className:"items-stretch gap-0"+(a?" flex-col":" flex-wrap xl:flex-nowrap")+(d?" "+d:""),ref:i,children:t})}},6620:(e,t,a)=>{a.d(t,{A:()=>p});var s=a(4848),l=a(6540),d=a(3698),i=a(620),r=a(5737);let c=(0,r.A)("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]),o=(0,r.A)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);function n(e){let{docPageObject:t}=e,[a,r]=l.useState(!1),[n,h]=l.useState([]);return l.useEffect(()=>{(0,d.A)("/api/admin/docs/get-child-pages",{method:"post",body:{pageId:t.id}}).then(e=>{e.success&&h(e.result)})},[]),(0,s.jsxs)("div",{className:"card col relative cursor-pointer",onClick:e=>{var a;(null===(a=e.target)||void 0===a?void 0:a.closest(".cancel-link"))?e.preventDefault():window.location.pathname="/su/docs/pages/".concat(t.id)},children:[a&&(0,s.jsx)(i.A,{width:"20px"}),(0,s.jsxs)("div",{className:"w-full items-start",children:[(0,s.jsx)(c,{}),(0,s.jsxs)("div",{className:"flex-col items-start gap-0 relative z-10",children:[(0,s.jsx)("span",{className:"title",children:t.title}),(0,s.jsx)("span",{className:"-my-3",dangerouslySetInnerHTML:{__html:t.description||""}})]}),(0,s.jsxs)("div",{className:"ml-auto cancel-link",children:[(0,s.jsx)("button",{onClick:()=>{window.location.href="/su/docs/edit-page?id=".concat(t.id)},className:"outlined small-text light-gray",children:"Edit Page"}),(0,s.jsx)("button",{onClick:()=>{window.confirm("Delete this page?")&&(r(!0),(0,d.A)("/api/admin/docs/delete-page",{method:"post",body:t}).then(e=>{e.success&&window.location.reload(),setTimeout(()=>{r(!1)},1e3)}))},className:"outlined small-text light-gray",children:"Delete Page"})]})]}),n&&(0,s.jsxs)("div",{className:"-mt-[40px] pt-[40px] ml-[10px] pl-[20px] border-0 border-l border-slate-200 border-solid w-full flex-col items-start cancel-link",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(o,{}),(0,s.jsx)("span",{className:"text-slate-300 font-semibold",children:"Children Pages"})]}),n.map((e,t)=>(0,s.jsxs)("div",{className:"card w-full",onClick:()=>{window.location.pathname="/su/docs/pages/".concat(e.id)},children:[(0,s.jsx)(c,{}),(0,s.jsx)("span",{children:e.title})]},t))]})]})}var h=a(557);function p(e){let{data:t}=e,{env:a}=t,r=t.docPages,[c,o]=l.useState(!1);function p(e){window.confirm(e?"Update Docs DB from JSON file?":"Update docs json file?")&&(o(!0),(0,d.A)("/api/admin/docs/persist",{method:"post",body:{pull:e}}).then(t=>{t.success?window.alert(e?"Docs database table Updated Sucessfully!":"JSON data written Successfully!"):window.alert("Operation failed!"),setTimeout(()=>{o(!1)},1e3)}).catch(e=>{setTimeout(()=>{o(!1)},1e3)}))}return(0,s.jsxs)(l.Fragment,{children:[c&&(0,s.jsx)(i.A,{}),(0,s.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between w-full mb-6",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Documentation Pages"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("a",{href:"/su/docs/create-page",className:"button",children:"Create Page"}),(0,s.jsxs)(h.A,{children:[(0,s.jsx)("button",{className:"outlined gray",onClick:()=>{p(!1)},children:"Push"}),(0,s.jsx)("button",{className:"outlined gray",onClick:()=>{p(!0)},children:"Pull"})]})]})]}),(0,s.jsx)("div",{className:"paper flex-col items-stretch gap-10 w-full",children:r.map((e,t)=>(0,s.jsx)(n,{docPageObject:e},t))})]})]})}},7296:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(5737).A)("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]])},6831:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(5737).A)("DatabaseBackup",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]])},8622:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(5737).A)("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},7206:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(5737).A)("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]])},4858:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(5737).A)("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]])},2750:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(5737).A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},2595:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(5737).A)("SquareChevronRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]])},4909:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(5737).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])}}]);