import{r as d,j as e,L as c}from"./vendor-tanstack-BpuysabX.js";import{L as u}from"./lazy-markdown-rmxkK4GI.js";import{aT as m,C as x,m as g,o as f,b4 as o,ct as h}from"./index-CREafGO4.js";import{aC as v,aD as p}from"./vendor-radix-DIu41Ss_.js";const k=({artifact:t,compact:s=!1})=>{const a=d.useMemo(()=>m(new Date(t.created??""),"dateTime"),[t.created]);return e.jsx(c,{to:"/artifacts/key/$key",params:{key:t.key??""},children:e.jsxs(x,{className:"hover:shadow-lg hover:border-primary",children:[e.jsx(g,{children:e.jsx("p",{className:"text-sm font-bold text-muted-foreground",children:t.type?.toUpperCase()})}),e.jsxs(f,{children:[e.jsxs("div",{className:o("flex",s?"flex-row justify-between":"flex-col"),children:[s?e.jsx("h4",{className:"text-xl font-semibold tracking-tight font-bold",children:t.key}):e.jsx("h3",{className:"text-2xl font-semibold tracking-tight font-bold",children:t.key}),e.jsxs("div",{className:o("flex mt-2",s?"flex-col-reverse items-end":"justify-between"),children:[s?e.jsx("p",{className:"text-sm font-mono",children:a}):e.jsx("p",{className:"text-xs font-mono",children:a}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Created"})]})]}),e.jsx("hr",{className:"my-2"}),t.description?e.jsx("div",{className:"text-muted-foreground overflow-hidden truncate",children:e.jsx(u,{children:t.description??""})}):e.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No description"})]})]})})},b=h("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),l=d.createContext({size:"default",variant:"default"});function C({className:t,variant:s,size:a,children:r,...i}){return e.jsx(v,{"data-slot":"toggle-group","data-variant":s,"data-size":a,className:o("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",t),...i,children:e.jsx(l.Provider,{value:{variant:s,size:a},children:r})})}function z({className:t,children:s,variant:a,size:r,...i}){const n=d.useContext(l);return e.jsx(p,{"data-slot":"toggle-group-item","data-variant":n.variant||a,"data-size":n.size||r,className:o(b({variant:n.variant||a,size:n.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",t),...i,children:s})}export{k as A,C as T,z as a};
//# sourceMappingURL=toggle-group-D2a-wPQL.js.map
