import{j as e,cO as l,aS as c,d8 as m,cB as x,aX as j,b3 as h}from"./react-vendor-xYZnmIII.js";import{B as i,a,c as p,g}from"./ui-components-CQM92IK3.js";import{D as u}from"./layout-DC6VQ8xV.js";import f from"./frontend-system-Cf8yn--z.js";import o from"./page-create-CU7SVN-y.js";import N from"./theme-config-BVttr6YR.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";import"./main-CnGu8e_N.js";import"./theme-colors-CLpwvDr4.js";import"./appearance-5ivIjthu.js";import"./language-C7bQIqs2.js";import"./notification-C3MPMjX2.js";import"./app-logo-BQGZ7CFC.js";import"./route-D0xh7FtZ.js";import"./use-lang-Dg6I_Fym.js";import"./input-error-_LAmvivg.js";import"./loading-button-D7aXR3K4.js";const b=({project:t})=>{const n=t.pages.filter(s=>s.type==="home"),d=t.pages.filter(s=>s.type==="inner");return e.jsxs("div",{className:"md:px-4",children:[e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(N,{project:t}),e.jsx(f,{})]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold",children:"Pages"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Manage your project pages"})]}),e.jsx(o,{projectId:t.id,triggerHandler:e.jsxs(i,{className:"px-3",children:[e.jsx(l,{className:"h-4 w-4"}),e.jsx("span",{children:"Create Page"})]})})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"mb-3 text-base font-semibold",children:"Home Pages"}),n.length>0?e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:n.map(s=>e.jsxs(a,{className:p("hover:outline-primary relative cursor-pointer p-5 transition-all hover:outline",s.status?"outline-primary outline":""),onClick:()=>{j.post(route("pages.update",s.id),{title:s.title,type:"home",status:!0})},children:[s.status&&e.jsx(g,{onClick:r=>r.stopPropagation(),className:"absolute -top-[22px] left-1/2 -translate-x-1/2 cursor-auto rounded-b-none",children:"Activated"}),e.jsx("h3",{className:"group-hover:text-primary mb-1 text-lg font-semibold transition-colors",children:s.title}),e.jsxs("div",{className:"absolute top-4 right-4 flex items-center justify-end gap-2",children:[e.jsx(c,{onClick:r=>r.stopPropagation(),href:route("page.editor",{project:t.id,page:s.id}),children:e.jsx(i,{size:"icon",variant:"secondary",className:"h-8 w-8",children:e.jsx(m,{})})}),e.jsx("a",{onClick:r=>r.stopPropagation(),href:route("page.show",s.id),target:"_blank",children:e.jsx(i,{size:"icon",variant:"secondary",className:"h-8 w-8",children:e.jsx(x,{})})})]})]},s.id))}):e.jsx(a,{className:"border-dashed",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("div",{className:"bg-muted mb-4 flex h-16 w-16 items-center justify-center rounded-full",children:e.jsx(h,{className:"text-muted-foreground h-8 w-8"})}),e.jsx("h3",{className:"mb-2 text-lg font-semibold",children:"No pages yet"}),e.jsx("p",{className:"text-muted-foreground mb-6 max-w-sm text-sm",children:"Get started by creating your first page for this project."}),e.jsx(o,{projectId:t.id,triggerHandler:e.jsxs(i,{children:[e.jsx(l,{className:"mr-2 h-4 w-4"}),"Create Your First Page"]})})]})})]}),e.jsxs("div",{className:"mt-6",children:[e.jsx("h2",{className:"mb-3 text-base font-semibold",children:"Inner Pages"}),d.length>0?e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:d.map(s=>e.jsxs(a,{className:"relative p-5 transition-all",children:[e.jsx("h3",{className:"group-hover:text-primary mb-1 text-lg font-semibold transition-colors",children:s.title}),e.jsxs("div",{className:"absolute top-4 right-4 flex items-center justify-end gap-2",children:[e.jsx(c,{onClick:r=>r.stopPropagation(),href:route("page.editor",{project:t.id,page:s.id}),children:e.jsx(i,{size:"icon",variant:"secondary",className:"h-8 w-8",children:e.jsx(m,{})})}),e.jsx("a",{onClick:r=>r.stopPropagation(),href:route("page.show",s.id),target:"_blank",children:e.jsx(i,{size:"icon",variant:"secondary",className:"h-8 w-8",children:e.jsx(x,{})})})]})]},s.id))}):e.jsx(a,{className:"border-dashed",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("div",{className:"bg-muted mb-4 flex h-16 w-16 items-center justify-center rounded-full",children:e.jsx(h,{className:"text-muted-foreground h-8 w-8"})}),e.jsx("h3",{className:"mb-2 text-lg font-semibold",children:"No pages yet"}),e.jsx("p",{className:"text-muted-foreground mb-6 max-w-sm text-sm",children:"Get started by creating your first page for this project."}),e.jsx(o,{projectId:t.id,triggerHandler:e.jsxs(i,{children:[e.jsx(l,{className:"mr-2 h-4 w-4"}),"Create Your First Page"]})})]})})]})]})]})};b.layout=t=>e.jsx(u,{children:t});export{b as default};
