import{r as t,h as i,H as s,g as e}from"./p-1ea36ff3.js";import{m as r,i as a}from"./p-08136f3c.js";import{A as c}from"./p-7ae3d917.js";import"./p-83f217d4.js";const n={damga:"shield-check"};let o=class{constructor(i){t(this,i)}render(){const{product:t}=this;return t?i(s,null,i("div",{class:{"icon-container":!0,[t.type]:!0}},i("dvn-icon",{iconName:`uil uil-${n[t.type]||"question"}`,scale:"large"})),t.name):i(s,null,i("div",{class:"icon-container"},i("dvn-icon",{iconName:"uil uil-plus",scale:"large"})),"Add new product")}};o.style="devingen-product-card{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:calc(2 * var(--spacing-unit));color:var(--color-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}devingen-product-card .icon-container{padding:calc(1.5 * var(--spacing-unit));background:var(--color-background-primary);border-radius:calc(var(--corner-radius) / 3 * 2);margin-right:calc(2 * var(--spacing-unit))}devingen-product-card .icon-container.damga{background:var(--color-primary);color:white}";let l=class{constructor(i){t(this,i),this.unsubscribe=()=>{},this.activeClass="link-active",this.exact=!1,this.strict=!0,this.custom="a",this.match=null}componentWillLoad(){this.computeMatch()}computeMatch(){this.location&&(this.match=r(this.location.pathname,{path:this.urlMatch||this.url,exact:this.exact,strict:this.strict}))}handleClick(t){var i,s;if(!a(t)&&this.history&&this.url&&this.root)return t.preventDefault(),this.history.push((s=this.root,"/"==(i=this.url).charAt(0)&&"/"==s.charAt(s.length-1)?s.slice(0,s.length-1)+i:s+i))}render(){let t={class:{[this.activeClass]:null!==this.match},onClick:this.handleClick.bind(this)};return this.anchorClass&&(t.class[this.anchorClass]=!0),"a"===this.custom&&(t=Object.assign({},t,{href:this.url,title:this.anchorTitle,role:this.anchorRole,tabindex:this.anchorTabIndex,"aria-haspopup":this.ariaHaspopup,id:this.anchorId,"aria-posinset":this.ariaPosinset,"aria-setsize":this.ariaSetsize,"aria-label":this.ariaLabel})),i(this.custom,Object.assign({},t),i("slot",null))}get el(){return e(this)}static get watchers(){return{location:["computeMatch"]}}};c.injectProps(l,["history","location","root"]);export{o as devingen_product_card,l as stencil_route_link}