import{r as e}from"./rolldown-runtime-BM3Ffeng.js";import{A as t,D as n,E as r,I as i,P as a,Pt as o,Xt as s,et as c,k as l,nt as u,qt as d,x as f}from"./vue-vendor-DMUmTARL.js";import{Yn as p}from"./icons-vendor-Buq6V-Ga.js";import{Tt as m}from"./index-y6crcKNt.js";import{t as h}from"./AutoIcon-BdLMrjNo.js";var g={class:`sso-provider-picker__grid`},_=[`disabled`,`onClick`],v={class:`sso-provider-picker__icon`},y={class:`min-w-0`},b={class:`sso-provider-picker__label`},x={key:0,class:`sso-provider-picker__configured`},S={class:`sso-provider-picker__icon sso-provider-picker__icon--blank`},C=i({__name:`SsoProviderPicker`,props:{templates:{},variant:{default:`empty`},showBlank:{type:Boolean,default:!0}},emits:[`blank`,`select-template`],setup(e,{emit:i}){let m=e,C=i,w=r(()=>m.variant===`empty`?`h-8 w-8 transition-transform duration-300 group-hover:scale-110`:`h-6 w-6 transition-transform duration-300 group-hover:scale-105`),T=r(()=>m.variant===`empty`?`h-7 w-7 text-placeholder transition-colors duration-300 group-hover:text-blue-500`:`h-5 w-5 text-placeholder transition-colors duration-300 group-hover:text-blue-500`);return(r,i)=>{let m=h;return c(),t(`div`,{class:d([`zf-sso-provider-picker`,`sso-provider-picker--${e.variant}`])},[n(`div`,g,[(c(!0),t(f,null,u(e.templates,e=>(c(),t(`button`,{key:e.provider,type:`button`,class:d([`sso-provider-picker__item group`,{"sso-provider-picker__item--disabled":e.configured}]),disabled:e.configured,onClick:t=>C(`select-template`,e.provider)},[n(`div`,v,[a(m,{icon:e.icon,"click-preview":!1,class:d(o(w))},null,8,[`icon`,`class`])]),n(`span`,y,[n(`span`,b,s(e.name),1),e.configured?(c(),t(`span`,x,`已配置`)):l(``,!0)])],10,_))),128)),e.showBlank?(c(),t(`button`,{key:0,type:`button`,class:`sso-provider-picker__item sso-provider-picker__item--blank group`,onClick:i[0]||=e=>C(`blank`)},[n(`div`,S,[a(o(p),{class:d(o(T))},null,8,[`class`])]),i[1]||=n(`span`,{class:`sso-provider-picker__label`},`空白新增`,-1)])):l(``,!0)])],2)}}}),w=e({default:()=>T}),T=m(C,[[`__scopeId`,`data-v-af2aeae9`]]);export{w as n,T as t};