import{d as _,u as y,ab as x,ac as b,R as c,j as i,a as n,w as o,b as t,o as l,ad as g,ae as u,af as v,ag as D,$ as h,a5 as $,c as w,ah as S,t as p,ai as k}from"./index-CWMhB7z4.js";const B={class:"flex flex-col gap-3"},C={class:"flex-1"},V={class:"ml-auto text-xs tabular-nums text-zinc-400"},N=_({name:"ShwfedPrototypeActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(m){const r=y(m,"modelValue"),f=(()=>{const s=new Map;for(const e of x){if(e.type===b||e.deprecated)continue;const a=s.get(e.type);(!a||e.compatibilityDate>a.compatibilityDate)&&s.set(e.type,{type:e.type,compatibilityDate:e.compatibilityDate,name:e.metadata.name,icon:e.metadata.icon})}return[...s.values()].sort((e,a)=>e.name.localeCompare(a.name,"zh"))})();function d(s,e){r.value={type:s,compatibilityDate:e}}return(s,e)=>(l(),c("div",B,[e[0]||(e[0]=i("p",{class:"text-xs text-zinc-500"}," 原型按钮点击后无任何副作用，用于占位。选择下方任意类型可将其转换为正式按钮 —— 此转换仅能进行一次。 ",-1)),n(t(k),null,{default:o(()=>[n(t(g),{align:"inline-start"},{default:o(()=>[n(t(u),{icon:"fluent:arrow-swap-20-regular"})]),_:1}),n(t(v),null,{default:o(()=>[n(t(D),null,{default:o(()=>[(l(!0),c(h,null,$(t(f),a=>(l(),w(t(S),{key:a.type,value:a.type,onSelect:z=>d(a.type,a.compatibilityDate)},{default:o(()=>[n(t(u),{icon:a.icon,class:"size-4 shrink-0"},null,8,["icon"]),i("span",C,p(a.name),1),i("span",V,p(a.compatibilityDate),1)]),_:2},1032,["value","onSelect"]))),128))]),_:1})]),_:1})]),_:1})]))}});export{N as default};
