// @bun
var g=Object.defineProperty;var p=(e)=>e;function f(e,t){this[e]=p.bind(null,t)}var v=(e,t)=>{for(var a in t)g(e,a,{get:t[a],enumerable:!0,configurable:!0,set:f.bind(t,a)})};var x=(e,t)=>()=>(e&&(t=e(e=0)),t);import{Button as d}from"@contractspec/lib.design-system";import{PlugZap as u,ToggleRight as b}from"lucide-react";import{jsx as n,jsxs as r}from"react/jsx-runtime";function C({id:e,provider:t,name:a,category:s,enabled:o=!0,lastSyncAt:l,status:i="connected",onToggle:c,onConfigure:m}){return r("div",{className:"flex flex-col gap-4 rounded-2xl border border-border bg-card p-4 shadow-sm",children:[r("header",{className:"flex items-center justify-between",children:[r("div",{children:[n("p",{className:"font-semibold text-xl",children:a}),n("p",{className:"text-muted-foreground text-sm",children:t})]}),r(d,{variant:"outline",size:"sm",className:`inline-flex items-center gap-2 rounded-full border px-3 py-1 font-semibold text-xs uppercase tracking-wide ${i==="connected"?"text-emerald-500 bg-emerald-500/10 border-emerald-500/30":i==="error"?"text-red-500 bg-red-500/10 border-red-500/30":"text-gray-500 bg-gray-500/10 border-gray-500/30"}`,onPress:()=>c?.(e,!o),children:[n(b,{className:"h-3.5 w-3.5"}),o?"Enabled":"Disabled"]})]}),r("div",{className:"text-muted-foreground text-sm",children:[s&&n("span",{className:"font-medium",children:s}),r("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-xs uppercase tracking-wide",children:[r("span",{className:"inline-flex items-center gap-1",children:[n(u,{className:"h-3 w-3"}),i]}),r("span",{children:["Last sync:"," ",l?new Date(l).toLocaleString():"Not synced yet"]})]})]}),r("footer",{className:"flex items-center gap-2",children:[n(d,{className:"flex-1",onPress:()=>m?.(e),children:"Configure"}),n(d,{variant:"ghost",className:"flex-1",onPress:()=>c?.(e,!o),children:o?"Disconnect":"Connect"})]})]})}export{C as IntegrationCard};
