module.exports=[86304,a=>{"use strict";var b=a.i(84002),c=a.i(42261),d=a.i(75773),e=a.i(68114);let f=(0,c.cva)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});a.s(["Badge",0,function({className:a,variant:c="default",asChild:g=!1,...h}){let i=g?d.Slot.Root:"span";return(0,b.jsx)(i,{"data-slot":"badge","data-variant":c,className:(0,e.cn)(f({variant:c}),a),...h})}])},46193,a=>{"use strict";var b=a.i(84002),c=a.i(57001),d=a.i(31374),e=a.i(86304),f=a.i(99570),g=a.i(68114),h=a.i(21584),i=a.i(66510);let j=(0,i.createServerReference)("70e36018e956ae214965aea4cb56ab1e2342da1971",i.callServer,void 0,i.findSourceMapURL,"setSkillEnabledAction"),k={all:"All",enabled:"Enabled",disabled:"Disabled"};function l({skill:a,agentSlug:i}){let[k,m]=(0,c.useTransition)(),[n,o]=(0,c.useState)(null),p=n??!a.disabled;return(0,b.jsxs)("li",{className:(0,g.cn)("flex items-start gap-3 px-4 py-3 transition-opacity",!p&&"opacity-70"),children:[(0,b.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-md border bg-background text-base",children:a.emoji??"·"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"font-mono text-sm",children:a.name}),a.bundled&&(0,b.jsx)(e.Badge,{variant:"outline",className:"h-4 px-1 text-[9px] uppercase tracking-wide",children:"bundled"}),a.always&&(0,b.jsx)(e.Badge,{variant:"secondary",className:"h-4 px-1 text-[9px] uppercase tracking-wide",children:"always-on"}),p&&!a.eligible&&(0,b.jsx)(e.Badge,{variant:"outline",className:"h-4 px-1 text-[9px] uppercase tracking-wide text-amber-600 dark:text-amber-400",title:"Enabled in config, but a requirement is missing (binary, allowlist, agent filter).",children:"needs setup"})]}),a.description&&(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:a.description}),(0,b.jsx)("p",{className:"mt-1 truncate font-mono text-[10px] text-muted-foreground/70",children:a.source})]}),(0,b.jsx)("div",{className:"shrink-0 self-center",children:(0,b.jsx)(f.Button,{type:"button",variant:p?"outline":"default",size:"sm",onClick:function(){let b=!p;o(b),m(async()=>{let c=await j(a.skillKey,b,i);c.ok?h.toast.success(`${b?"Enabled":"Disabled"} ${a.name}`):(o(!b),h.toast.error(c.error??`Could not ${b?"enable":"disable"} ${a.name}`))})},disabled:k||a.always,title:a.always?"Always-on skill; cannot be disabled.":void 0,className:"h-7 w-20 text-xs",children:k?(0,b.jsx)(d.Loader2,{className:"size-3.5 animate-spin"}):p?"Enabled":"Enable"})})]})}a.s(["SkillsList",0,function({skills:a,agentSlug:d}){let[e,f]=(0,c.useState)("all"),h=(0,c.useMemo)(()=>{let b=0,c=0;for(let d of a)d.disabled?c++:b++;return{all:a.length,enabled:b,disabled:c}},[a]),i=(0,c.useMemo)(()=>"all"===e?a:"enabled"===e?a.filter(a=>!a.disabled):a.filter(a=>a.disabled),[a,e]);return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"inline-flex items-center gap-1 rounded-lg border bg-muted/40 p-1",role:"tablist","aria-label":"Filter skills",children:Object.keys(k).map(a=>{let c=e===a;return(0,b.jsxs)("button",{type:"button",role:"tab","aria-selected":c,onClick:()=>f(a),className:(0,g.cn)("rounded-md px-3 py-1 text-xs font-medium transition-colors",c?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[k[a],(0,b.jsx)("span",{className:"ml-1.5 text-[10px] tabular-nums text-muted-foreground",children:h[a]})]},a)})}),0===i.length?(0,b.jsx)("div",{className:"rounded-lg border bg-card py-10 text-center text-sm text-muted-foreground",children:"No skills match this filter."}):(0,b.jsx)("ul",{className:"divide-y rounded-lg border bg-card",children:i.map(a=>(0,b.jsx)(l,{skill:a,agentSlug:d},a.skillKey))})]})}],46193)}];

//# sourceMappingURL=src_components_0d1kpza._.js.map