"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),s=require("react/jsx-runtime"),a=require("lucide-react"),t=require("../styles/OverrideTimeline.module.css.js"),l=require("../styles/CustomTooltip.module.css.js"),i=require("../components/CustomTooltip.js");exports.default=function(d){var n=d.changeLog,r=d.headerText,c=void 0===r?"Override History":r;return n&&0!==n.length?s.jsxs("div",e.__assign({className:t.default.container},{children:[s.jsxs("div",e.__assign({className:t.default.header},{children:[s.jsx(a.History,{color:"#475569",size:15,className:t.default.headerIcon}),s.jsx("span",e.__assign({className:t.default.headerText},{children:c}))]})),s.jsx("div",e.__assign({className:t.default.timeline},{children:n.map(function(a,d){var r,c,o=d===n.length-1,u="global"===a.scope.toLowerCase(),m=o&&["edited","add","remove","edit"].includes(a.type);return s.jsxs("div",e.__assign({className:t.default.timelineItem},{children:[s.jsx(i.default,e.__assign({content:a.scope,placement:"top",withArrow:!0,contentClassName:l.default.customTooltip,sideOffset:5},{children:s.jsx("div",e.__assign({className:t.default.leftColumn},{children:m?s.jsx("span",e.__assign({className:t.default.leafLabel},{children:"add"===a.type?"Added":"remove"===a.type?"Removed":"Edited"})):s.jsx("span",e.__assign({className:t.default.scopeLabel},{children:a.scope}))}))})),s.jsxs("div",e.__assign({className:t.default.middleColumn},{children:[!o&&s.jsx("div",{className:t.default.verticalLine}),m&&s.jsx("div",{className:t.default.leafConnector}),!m&&s.jsx("div",{className:"".concat(t.default.dot," ").concat(u?t.default.dotGlobal:t.default.dotOther)})]})),s.jsx("div",e.__assign({className:t.default.rightColumn},{children:m?s.jsxs("div",e.__assign({className:t.default.leafCard},{children:[s.jsx("div",{className:t.default.leafDot}),s.jsx("div",e.__assign({className:t.default.leafContent},{children:(r=a.text,c=r.split(/(<s>.*?<\/s>)/g),s.jsx("span",{children:c.map(function(a,l){if(a.startsWith("<s>")&&a.endsWith("</s>")){var i=a.slice(3,-4);return s.jsx("span",e.__assign({className:t.default.strikethrough},{children:i}),l)}return s.jsx("span",{children:a},l)})}))}))]})):s.jsx("div",e.__assign({className:t.default.normalContent},{children:"Default Variant"===a.text?"Default":a.text}))}))]}),d)})}))]})):null};
//# sourceMappingURL=OverrideTimeline.js.map
