{"version":3,"sources":["components/ui-shell/header-nav-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAiC,UAAU,EAAE,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMxE;;;;;GAKG;AACH,cACM,eAAgB,SAAQ,oBAAsB;IAClD;;OAEG;IAEH,IAAI,EAAG,MAAM,CAAC;IAEd;;OAEG;IAEH,KAAK,EAAG,MAAM,CAAC;IAEf;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAc;IAE1B,gBAAgB;IAOhB,MAAM;IASN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,eAAe,CAAC","file":"header-nav-item.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2021\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport settings from 'carbon-components/es/globals/js/settings';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { html, property, customElement, LitElement } from 'lit-element';\nimport FocusMixin from '../../globals/mixins/focus';\nimport styles from './header.scss';\n\nconst { prefix } = settings;\n\n/**\n * Header nav item.\n * @element bx-header-nav-item\n * @csspart link The link.\n * @csspart title The title.\n */\n@customElement(`${prefix}-header-nav-item`)\nclass BXHeaderNavItem extends FocusMixin(LitElement) {\n  /**\n   * Link `href`.\n   */\n  @property()\n  href!: string;\n\n  /**\n   * The title.\n   */\n  @property()\n  title!: string;\n\n  /**\n   * As child of <ul>, this element must have role of listitem\n   */\n  @property({ reflect: true })\n  role: string = 'listitem';\n\n  createRenderRoot() {\n    return this.attachShadow({\n      mode: 'open',\n      delegatesFocus: Number((/Safari\\/(\\d+)/.exec(navigator.userAgent) ?? ['', 0])[1]) <= 537,\n    });\n  }\n\n  render() {\n    const { href, title } = this;\n    return html`\n      <a part=\"link\" class=\"${prefix}--header__menu-item\" tabindex=\"0\" href=\"${ifDefined(href)}\">\n        <span part=\"title\" class=\"${prefix}--text-truncate--end\"><slot>${title}</slot></span>\n      </a>\n    `;\n  }\n\n  static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXHeaderNavItem;\n"]}