"use strict";var M=Object.create;var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var D=Object.getPrototypeOf;var F=Object.prototype.hasOwnProperty;var f=(t,e)=>a(t,"name",{value:e,configurable:true});var H=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:true})};var d=(t,e,r,o)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let s of R(e))if(!F.call(t,s)&&s!==r)a(t,s,{get:()=>e[s],enumerable:!(o=m(e,s))||o.enumerable})}return t};var h=(t,e,r)=>(r=t!=null?M(D(t)):{},d(e||!t||!t.__esModule?a(r,"default",{value:t,enumerable:true}):r,t));var I=t=>d(a({},"__esModule",{value:true}),t);var u=(t,e,r,o)=>{var s=o>1?void 0:o?m(e,r):e;for(var i=t.length-1,n;i>=0;i--)if(n=t[i])s=(o?n(e,r,s):n(s))||s;if(o&&s)a(e,r,s);return s};var A={};H(A,{default:()=>k});module.exports=I(A);var N=require("react/jsx-runtime");var y=h(require("classnames"));var c=require("mobx-react");var C=require("react");var b=h(require("../../helpers/routing-helpers"));var v=require("../../helpers/url-helpers");let l=class extends C.Component{onClick(e){const{disabled:r=false,target:o="",to:s}=this.props;if(r){e.preventDefault()}else if(o==="_blank"){e.preventDefault();(0,v.openExternalUrl)(s,true)}}render(){const{children:e,stores:r,to:o,className:s="",activeClassName:i="",strictFilter:n=false,disabled:P=false,style:g={}}=this.props;const{router:p}=r;const S=n?`${o}`:`${o}(*action)`;const E=(0,b.default)(S,p.location.pathname);const $=(0,y.default)({[`${s}`]:true,[`${i}`]:E,"is-disabled":P});return(0,N.jsx)("a",{href:p.history.createHref(o),className:$,style:g,onClick:x=>this.onClick(x),children:e})}};f(l,"Link");l=u([(0,c.inject)("stores"),c.observer],l);var k=l;
