(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[107],{47107:function(e,t,r){"use strict";r.r(t),r.d(t,{NavLink:function(){return b},default:function(){return p}});var n=r(41664),a=r(11163),i=(r(67294),r(52565)),o=r(43894),s=r(85893),c=(0,i.Gp)((function(e,t){var r=e.disabled,n=e.href,a=e.isActive,i=e.rightIcon,c=e.title,h=e.onClick;return(0,s.jsx)(o.zx,{ref:t,as:"a",href:r?void 0:n,onClick:h,variant:"ghost",disabled:r,mr:4,colorScheme:a?"complimentary":"ghost",rightIcon:i,"data-testid":"nav-link-".concat(c),isActive:a,_active:{bg:"transparent"},children:c})})),h=r(59499);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){(0,h.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=l(l({zones:[]},{development:{host:"localhost:3000"},zones:[{basePath:"/datamap",development:{host:"localhost:4000"}}]}),{},{basePath:"/"}),b=function(e){var t=e.title,r=e.href,i=e.disabled,o=e.rightIcon,h=e.exact,f=(0,a.useRouter)(),l=f.basePath||"/",b=function(e){var t=e.href,r=e.basePath;return function(e){var t,r,n=e.config,a=e.href,i=e.basePath,o=null!==(t=(null!==(r=n.zones)&&void 0!==r?r:[]).find((function(e){return a.startsWith(e.basePath)})))&&void 0!==t?t:n;return o.basePath===i?{basePath:i,href:a.replace(i,"/").replace("//","/")}:{basePath:o.basePath,href:a}}({config:u,href:t,basePath:r})}({href:r,basePath:l}),p=h?f.pathname===b.href:f.pathname.startsWith(b.href);return i||b.basePath!==l?(0,s.jsx)(c,{disabled:i,href:b.href,isActive:p,rightIcon:o,title:t}):(0,s.jsx)(n.default,{href:b.href,passHref:!0,children:(0,s.jsx)(c,{isActive:p,rightIcon:o,title:t})})},p=b},11163:function(e,t,r){e.exports=r(69898)}}]);