"use strict";var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),t=require("prop-types"),s=require("@material-ui/core"),o=require("classnames"),n=require("react-router"),c=require("react");require("../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js");var i=require("../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js"),u=require("react/jsx-runtime"),a=require("../TruncatedText/index.js"),l=require("../../icons/iconParkIcons.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js");var d=p(e),m=p(r),j=p(t),f=p(o),h=["pathItems","withBackIcon","classes"],q=["container"];function x(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);r&&(s=s.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,s)}return t}function I(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?x(Object(t),!0).forEach((function(r){d.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var b=s.makeStyles((function(e){return{container:{display:"flex",gap:"0px 8px",fontSize:"0.8125rem"},pathPart:{color:e.palette.primary.text6,"&:hover":{textDecoration:"underline"}},lastPathPart:{color:e.palette.primary.text1,"&:hover":{textDecoration:"underline"}},iconLink:{display:"flex",alignItems:"center",color:e.palette.primary.text6,"&:hover":{textDecoration:"underline"}}}})),y=function(e){var r=e.pathItems,t=e.withBackIcon,o=e.classes,p=void 0===o?{}:o,j=m.default(e,h),x=p.container,y=m.default(p,q),v=b();return u.jsx(s.Breadcrumbs,I(I({classes:I({li:f.default(v.container,x)},y)},j),{},{children:r.map((function(e,r,s){return u.jsxs(c.Fragment,{children:[0===r&&t&&u.jsx(n.Link,{to:e.href,className:v.iconLink,children:u.jsx(l.LeftIcon,{size:"small"})}),u.jsx(a,{children:u.jsx(i.UniversalLink,{className:f.default(v.pathPart,d.default({},v.lastPathPart,r===s.length-1&&!t)),"data-testid":"Breadcrumbs_".concat(e.text),href:e.href,children:e.text},e.text)})]},e.href)}))}))};y.propTypes={pathItems:j.default.arrayOf(j.default.shape({text:j.default.string,href:j.default.string})).isRequired},module.exports=y;
