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