import{_ as c}from"./PlatformIcon.vue_vue_type_script_setup_true_lang-9lfOeOxt.js";import{u as v}from"./vendor-i18n-DnQQ95F5.js";import{r as y,j as i,h as R,i as g,g as d,Y as n,D as m,F as b,o as h,e as l,M as s}from"./vendor-vue-gvI8EVHg.js";const M={class:"truncate"},$={class:"line-through opacity-50 mr-0.5"},B={class:"font-bold"},N=y({__name:"GroupBadge",props:{name:{},platform:{},subscriptionType:{default:"standard"},rateMultiplier:{},userRateMultiplier:{default:null},showRate:{type:Boolean,default:!0},daysRemaining:{default:null}},setup(r){const e=r,{t:o}=v(),a=l(()=>e.subscriptionType==="subscription"),u=l(()=>e.userRateMultiplier!==null&&e.userRateMultiplier!==void 0&&e.rateMultiplier!==void 0&&e.userRateMultiplier!==e.rateMultiplier),k=l(()=>e.showRate?a.value?!0:e.rateMultiplier!==void 0||u.value:!1),p=l(()=>a.value?e.daysRemaining!==null&&e.daysRemaining!==void 0?e.daysRemaining<=0?o("admin.users.expired"):o("admin.users.daysRemaining",{days:e.daysRemaining}):o("groups.subscription"):e.rateMultiplier!==void 0?`${e.rateMultiplier}x`:""),x=l(()=>{const t="px-1.5 py-0.5 rounded text-[10px] font-semibold";if(!a.value)return`${t} bg-black/10 dark:bg-white/10`;if(e.daysRemaining!==null&&e.daysRemaining!==void 0){if(e.daysRemaining<=0||e.daysRemaining<=3)return`${t} bg-red-200/80 text-red-800 dark:bg-red-800/50 dark:text-red-300`;if(e.daysRemaining<=7)return`${t} bg-amber-200/80 text-amber-800 dark:bg-amber-800/50 dark:text-amber-300`}return e.platform==="anthropic"?`${t} bg-orange-200/60 text-orange-800 dark:bg-orange-800/40 dark:text-orange-300`:e.platform==="openai"?`${t} bg-emerald-200/60 text-emerald-800 dark:bg-emerald-800/40 dark:text-emerald-300`:e.platform==="chatgpt"?`${t} bg-teal-200/60 text-teal-800 dark:bg-teal-800/40 dark:text-teal-300`:e.platform==="gemini"?`${t} bg-blue-200/60 text-blue-800 dark:bg-blue-800/40 dark:text-blue-300`:e.platform==="grok"?`${t} bg-slate-200/80 text-slate-800 dark:bg-slate-800/50 dark:text-slate-300`:e.platform==="sora"?`${t} bg-rose-200/60 text-rose-800 dark:bg-rose-800/40 dark:text-rose-300`:`${t} bg-violet-200/60 text-violet-800 dark:bg-violet-800/40 dark:text-violet-300`}),f=l(()=>e.platform==="anthropic"?a.value?"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400":"bg-amber-50 text-amber-700 dark:bg-amber-900/20 dark:text-amber-400":e.platform==="openai"?a.value?"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400":"bg-green-50 text-green-700 dark:bg-green-900/20 dark:text-green-400":e.platform==="chatgpt"?a.value?"bg-teal-100 text-teal-700 dark:bg-teal-900/30 dark:text-teal-400":"bg-teal-50 text-teal-700 dark:bg-teal-900/20 dark:text-teal-400":e.platform==="gemini"?a.value?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"bg-sky-50 text-sky-700 dark:bg-sky-900/20 dark:text-sky-400":e.platform==="sora"?a.value?"bg-rose-100 text-rose-700 dark:bg-rose-900/30 dark:text-rose-400":"bg-rose-50 text-rose-700 dark:bg-rose-900/20 dark:text-rose-400":e.platform==="grok"?a.value?"bg-slate-100 text-slate-700 dark:bg-slate-900/30 dark:text-slate-300":"bg-slate-50 text-slate-700 dark:bg-slate-900/20 dark:text-slate-300":a.value?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400");return(t,C)=>(s(),i("span",{class:m(["inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 text-xs font-medium transition-colors",f.value])},[r.platform?(s(),R(c,{key:0,platform:r.platform,size:"sm"},null,8,["platform"])):g("",!0),d("span",M,n(r.name),1),k.value?(s(),i("span",{key:1,class:m(x.value)},[u.value?(s(),i(b,{key:0},[d("span",$,n(r.rateMultiplier)+"x",1),d("span",B,n(r.userRateMultiplier)+"x",1)],64)):(s(),i(b,{key:1},[h(n(p.value),1)],64))],2)):g("",!0)],2))}});export{N as _};
