2 lines
2.0 KiB
JavaScript
2 lines
2.0 KiB
JavaScript
import{u as g,j as t,e as m,aD as f}from"./vendor-BKmmeuxg.js";import{D as x}from"./data-sort-modal-B2Yf_crJ.js";import{S as h}from"./switch-Db09nqXX.js";import{B as j}from"./button-BpNwv2aE.js";import{C as v}from"./card-D9_SJYq6.js";import{L as C}from"./label-HmIcv5Yx.js";import{L as S}from"./landing-layout-DQFYAk24.js";import"./utils-DxSsnXxD.js";import"./dialog-B2gN9MvT.js";import"./scroll-area-C8HGru-R.js";import"./switch-DFFqeub-.js";import"./index-WW_1X1qx.js";import"./index-CupQom6K.js";import"./app-logo-CmnEIwal.js";import"./main-_V386djS.js";import"./index-D9-QKOod.js";import"./dropdown-menu-DO-po5c1.js";import"./use-auth-NG-DQJrC.js";import"./use-screen-DU5n3V8C.js";import"./appearance-D2z3xcjR.js";import"./app-BytVvUs_.js";/* empty css */import"./language-BFZ7KItL.js";import"./separator-_3LZ_wAA.js";import"./notification-CYMPYbAP.js";import"./popover-B4kBsMuI.js";import"./profile-toggle-CvHrFE0q.js";import"./avatar-j28afJTV.js";import"./index.browser-OxPLOBIU.js";const Y=({page:n,navbarHeight:c=!0,children:s})=>{const{props:i}=g(),{customize:a}=i,r=n||i.page,p=r.slug,l=p==="about-us"||p==="our-team"||r.type!=="inner_page",u=r.sections.filter(e=>e.slug!=="footer_list_1"&&e.slug!=="footer_list_2"&&e.slug!=="footer_list_3"),d=(e,o)=>{m.post(route("page.section.update",e),{active:o})};return t.jsx(S,{navbarHeight:c,customizable:l,children:a?t.jsxs(t.Fragment,{children:[a&&r&&t.jsx("div",{className:"fixed top-20 right-6 z-20",children:t.jsx(x,{title:"Page Sections",data:u,handler:t.jsx(j,{size:"icon",children:t.jsx(f,{className:"h-7 w-7"})}),onOrderChange:(e,o)=>{m.post(route("page.section.sort"),{sortedData:e},{preserveScroll:!0,onSuccess:()=>o&&o(!1)})},renderContent:e=>t.jsxs(v,{className:"flex w-full items-center justify-between px-4 py-3",children:[t.jsx("p",{children:e.name}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(C,{htmlFor:"active",children:"Active"}),t.jsx(h,{id:"active",defaultChecked:e.active,onCheckedChange:o=>d(e.id,o)})]})]})})}),s]}):s})};export{Y as default};
|