import{j as e,y as n,e as d}from"./vendor-rThclpOQ.js";import{D as m}from"./delete-modal-CrLtMjfS.js";import{B as r}from"./button-ZcsoqUQn.js";import{P as p,a as u,b as x}from"./popover-otAaS-4X.js";import{t as g}from"./index-CWNIUFqh.js";import"./dialog-CDEDwQhm.js";import"./utils-8KAaAB9H.js";import"./index-DquVdLUg.js";const _=o=>{const{table:t,button:i}=o;return[{accessorKey:"name",header:()=>e.jsx("p",{className:"px-3",children:t.name}),cell:({row:s})=>e.jsx("div",{className:"px-3 py-1 text-sm font-medium",children:s.getValue("name")})},{accessorKey:"slug",header:()=>e.jsx("p",{className:"px-3",children:t.slug}),cell:({row:s})=>e.jsx("div",{className:"text-muted-foreground px-3 py-1 text-sm",children:s.getValue("slug")})},{accessorKey:"title",header:()=>e.jsx("p",{className:"px-3",children:t.title}),cell:({row:s})=>e.jsx("div",{className:"text-muted-foreground px-3 py-1 text-sm",children:s.getValue("title")})},{accessorKey:"meta_description",header:()=>e.jsx("p",{className:"px-3",children:t.meta_description}),cell:({row:s})=>e.jsx("div",{className:"text-muted-foreground px-3 py-1 text-sm",children:s.getValue("meta_description")})},{accessorKey:"meta_keywords",header:()=>e.jsx("p",{className:"px-3",children:t.meta_keywords}),cell:({row:s})=>e.jsx("div",{className:"text-muted-foreground px-3 py-1 text-sm",children:s.getValue("meta_keywords")})},{id:"action",header:()=>e.jsx("div",{className:"px-3 text-center",children:t.action}),cell:({row:s})=>{const a=s.original,l=window.location.origin+"/"+a.slug;return e.jsxs(p,{children:[e.jsx("div",{className:"flex justify-end pr-4",children:e.jsx(u,{asChild:!0,children:e.jsx(r,{size:"icon",variant:"ghost",onClick:c=>c.stopPropagation(),className:"bg-muted hover:!bg-muted-foreground/10 h-8 w-8",children:e.jsx(n,{className:"h-4 w-4"})})})}),e.jsxs(x,{align:"end",className:"flex w-[140px] flex-col space-y-1 p-2",children:[e.jsx(r,{size:"sm",variant:"ghost",className:"bg-muted hover:!bg-muted-foreground/10",onClick:()=>d.get(route("settings.custom-page.edit",a.id)),children:e.jsx("span",{children:t.edit_page})}),e.jsx(r,{size:"sm",variant:"ghost",className:"bg-muted hover:!bg-muted-foreground/10",onClick:()=>{navigator.clipboard.writeText(l),g.success("URL copied to clipboard")},children:e.jsx("span",{children:t.copy_url})}),e.jsx(r,{size:"sm",variant:"ghost",className:"bg-muted hover:!bg-muted-foreground/10",children:e.jsx("a",{target:"_blank",href:route("inner.page",a.slug),children:t.preview_page})}),a.slug!=="about-us"&&a.slug!=="our-team"&&a.slug!=="careers"&&e.jsx(m,{routePath:route("settings.custom-page.destroy",a.id),actionComponent:e.jsx(r,{size:"sm",variant:"destructive",children:e.jsx("span",{children:i.delete})})})]})]})}}]};export{_ as default};
