import{j as e}from"./sikshya-admin-sikshya-react-E_TY_un4.js";import{F as g,A as j}from"./sikshya-admin-FeaturePreviewSkeleton-dX7zKbyj.js";import{P as t,a as v,b as k}from"./sikshya-admin-PlanUpgradeOverlay-XI07NKbe.js";import{ad as E}from"./sikshya-admin-sikshya-vendor-BVAk_Gwu.js";import{s as w}from"./sikshya-admin.js";function G(s){const{mode:a,featureId:r,config:i,featureTitle:l,featureDescription:d,previewVariant:o,renderPreview:n,addonEnableTitle:c,addonEnableDescription:m,canEnable:u,enableBusy:p,onEnable:f,addonError:x,children:b}=s;if(a==="full")return e.jsx(e.Fragment,{children:b});const h=w("addon-enable-upgrade",r);return e.jsxs("div",{className:`relative isolate w-full max-w-none ${t}`,children:[e.jsx("div",{className:`pointer-events-none select-none opacity-[0.72] ${t}`,"aria-hidden":!0,children:n?n():e.jsx(g,{variant:o})}),a==="locked-plan"?e.jsx(v,{config:i,featureId:r,featureTitle:l,description:d}):null,a==="addon-off"?e.jsx(k,{children:e.jsx(j,{variant:"premium",title:c,description:m,canEnable:u,enableBusy:p,onEnable:f,upgradeUrl:h,error:x})}):null,a==="pending-addon"?e.jsx("div",{className:"absolute inset-0 z-20 flex min-h-full w-full flex-col items-center justify-center bg-white/85 p-6 backdrop-blur-sm dark:bg-slate-950/85",children:e.jsx("div",{className:"rounded-xl border border-slate-200 bg-white px-5 py-4 text-sm font-medium text-slate-700 shadow-sm dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200",children:E("Loading add-on status…","sikshya")})}):null]})}export{G};
