import{__assign as e}from"tslib";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{EditIcon as n}from"../_svg/PencilEdit.js";import r from"../_svg/RadioButton.js";var o=function(o){var l=o.variantName,a=void 0===l?"Default Variant":l,d=o.decisionStrength,p=void 0===d?90:d,s=o.children,c=o.isEditable,g=o.isSelected,x=void 0!==g&&g,f=o.onToggle,h=o.onEdit,u=o.styleOverrides,y={container:e({border:x?"1px solid #2563EB":"1px solid #E5E7EB",borderRadius:"8px",padding:"16px",backgroundColor:"#FFFFFF",marginBottom:"12px",fontFamily:'"Inter", "Plus Jakarta Sans", sans-serif',boxShadow:"0 1px 2px rgba(0,0,0,0.05)",position:"relative"},(void 0===u?{}:u).container),headerRow:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBottom:"12px",width:"100%",flexWrap:"wrap",gap:"8px"},leftGroup:{display:"flex",alignItems:"center",gap:"6px",flexWrap:"wrap",flex:"1 1 auto",marginRight:"8px"},badge:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"20px",padding:"0 6px",borderRadius:"4px",fontSize:"11px",fontWeight:500,lineHeight:"100%",whiteSpace:"nowrap",backgroundColor:"#F7F8FA",border:"1px solid #F0F2F5",color:"#374151"},divider:{color:"#CBD5E1",fontSize:"14px",fontWeight:300,display:"inline-block"},strengthText:{fontSize:"12px",color:"#37383B",fontWeight:400,display:"flex",alignItems:"center",gap:"3px",whiteSpace:"nowrap"},strengthValue:{fontWeight:700},editBtn:{display:"flex",alignItems:"center",gap:"4px",background:"none",border:"none",cursor:"pointer",color:"#475569",fontSize:"12px",fontWeight:500,padding:"2px 0",whiteSpace:"nowrap",alignSelf:"flex-start"},selectionWrapper:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:"2px"},content:{fontSize:"13px",color:"#37383B",lineHeight:"1.5",fontWeight:400,marginTop:"4px",display:"block",wordBreak:"break-word"}},m=a.toLowerCase().includes("default")?y.badge:e(e({},y.badge),{backgroundColor:"#FDF2F899",color:"#DB2777",borderColor:"#FDF2F8"});return t("div",e({style:y.container},{children:[t("div",e({style:y.headerRow},{children:[t("div",e({style:y.leftGroup},{children:[c&&i("div",e({style:y.selectionWrapper,onClick:function(){return f&&f(!x)}},{children:i(r,{isSelected:x})})),i("div",e({style:m},{children:a})),i("span",e({style:y.divider},{children:"|"})),t("span",e({style:y.strengthText},{children:["Decision Strength ",t("span",e({style:y.strengthValue},{children:[p,"%"]}))]}))]})),c&&t("button",e({style:y.editBtn,onClick:h},{children:[i(n,{}),"Edit"]}))]})),i("div",e({style:y.content},{children:i("span",e({style:{display:"inline"}},{children:s}))}))]}))};export{o as RuleVariantCard};
//# sourceMappingURL=RuleVariantCard.js.map
