import{__assign as e}from"tslib";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{Download as o,Plus as a}from"lucide-react";import t from"../styles/RuleHeader.module.css.js";import{usePermissionsStore as n}from"../store/usePermissionsStore.js";import{dt as l}from"../store/useLMSConfigStore.js";var s=function(s){var d=s.onAddRule,u=s.onOnboardStation,c=s.onExport,m=s.isExporting,p=void 0!==m&&m,b=s.ruleSetId,f=s.ruleSetName,g=s.ruleSetDescription,v=s.isGlobal,h=void 0!==v&&v,x=s.globalLabel,N=void 0===x?l("learnings.globalLearning.globalLabel","Global Learnings ( Default )"):x;s.addExemptionLabel;var L=s.addNewRuleLabel,S=void 0===L?l("learnings.header.addNewLearningButton","Add New Learning"):L,j=n(function(e){return e.hasPermission});if(!f&&!h)return null;var B=h?N:f,E=j("ilotj.rule.create",b||void 0),R=j("ilotj.rule.variant.create",b||void 0),C=E||R;return r("div",e({className:t.container},{children:[r("div",e({className:t.info},{children:[i("h1",{children:B}),g&&i("p",e({className:t.description},{children:g}))]})),r("div",e({className:t.actions,style:{display:"flex",gap:"8px"}},{children:[c&&r("button",e({onClick:c,disabled:p,className:t.exportButton},{children:[i(o,{size:14}),p?"Exporting...":l("learnings.header.exportButton","Export")]})),C&&d&&r("button",e({onClick:d,className:t.addRuleButton},{children:[i(a,{size:14}),S]})),u&&r("button",e({onClick:u,className:t.addRuleButton},{children:[i(a,{size:14}),"Onboard a station"]}))]}))]}))};export{s as default};
//# sourceMappingURL=RuleHeader.js.map
