import"./rolldown-runtime-BTPm5ob3.js";import{i as e,n as t,r as n,t as r}from"./animations-BBry1XJJ.js";import{Wn as i}from"./react-core-DZu2Qwle.js";import{S as a,ct as o,st as s}from"./index-OXd4Aieb.js";n();var c=e(),l=({title:e,description:n,icon:l,checked:u,onChange:d,statusMessage:f,statusType:p=`active`,disabled:m=!1,className:h=``,children:g,hideSwitch:_=!1,rightAction:v})=>(0,c.jsxs)(`div`,{className:o(`group relative bg-white border border-[#dcdcde] rounded-[5px] px-6 py-4 shadow-none transition-all duration-300`,m&&`opacity-60 cursor-not-allowed`,h),children:[(0,c.jsxs)(`div`,{className:`flex flex-col md:flex-row md:items-center justify-between gap-4`,children:[(0,c.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,c.jsxs)(`div`,{className:`text-base md:text-lg font-bold flex items-center gap-2 text-slate-800`,children:[l&&(0,c.jsx)(l,{size:20,className:`text-slate-800 opacity-70 shrink-0`}),(0,c.jsx)(`h4`,{className:`leading-tight truncate !m-0 !p-0 !border-none !bg-transparent`,children:(0,c.jsx)(a,{content:e})})]}),n&&(0,c.jsx)(`div`,{className:`text-xs font-medium text-slate-500 mt-0.5`,children:(0,c.jsx)(a,{content:n})})]}),(0,c.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[v&&(0,c.jsx)(`div`,{className:`mr-2`,children:v}),!_&&d!==void 0&&u!==void 0&&(0,c.jsx)(s,{checked:u,onCheckedChange:d,disabled:m})]})]}),g&&(0,c.jsx)(`div`,{className:`mt-6 pt-6 border-t border-slate-50`,children:g}),(0,c.jsx)(t,{children:f&&(0,c.jsx)(r.div,{initial:{opacity:0,height:0,marginTop:0},animate:{opacity:1,height:`auto`,marginTop:16},exit:{opacity:0,height:0,marginTop:0},className:`overflow-hidden`,children:(0,c.jsxs)(`div`,{className:o(`flex items-start gap-2.5 p-3 rounded-[5px] border text-[12px] font-medium transition-colors`,{active:`text-emerald-600 bg-emerald-50/50 border-emerald-100`,inactive:`text-slate-500 bg-slate-50/50 border-slate-100`,error:`text-rose-600 bg-rose-50/50 border-rose-100`,warning:`text-amber-600 bg-amber-50/50 border-amber-100`}[p]),children:[(0,c.jsx)(i,{size:15,className:`shrink-0 mt-0.5 opacity-70`}),(0,c.jsx)(`div`,{className:`flex-1 leading-relaxed`,children:(0,c.jsx)(a,{content:f,isHtml:!0})})]})})})]});export{l as t};