import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';

function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}

const typographyDefaultsVariant = {
  action: {
    tag: 'span',
    selector: {
      default: 'text-title-action',
      title: 'text-title-action',
    },
  },
  caption: {
    tag: 'span',
    selector: {
      default: 'text-info-caption',
      info: 'text-info-caption',
      read: 'text-read-caption',
    },
  },
  code: {
    tag: 'code',
    selector: {
      default: 'text-mono-code',
      mono: 'text-mono-code',
    },
  },
  detail: {
    tag: 'p',
    selector: {
      default: 'text-info-detail',
      info: 'text-info-detail',
      read: 'text-read-detail',
    },
  },
  h1: {
    tag: 'h1',
    selector: {
      default: 'text-title-h1',
      title: 'text-title-h1',
    },
  },
  h2: {
    tag: 'h2',
    selector: {
      default: 'text-title-h2',
      title: 'text-title-h2',
    },
  },
  h3: {
    tag: 'h3',
    selector: {
      default: 'text-title-h3',
      title: 'text-title-h3',
    },
  },
  h4: {
    tag: 'h4',
    selector: {
      default: 'text-title-h4',
      title: 'text-title-h4',
    },
  },
  h5: {
    tag: 'h5',
    selector: {
      default: 'text-title-h5',
      title: 'text-title-h5',
    },
  },
  h6: {
    tag: 'h6',
    selector: {
      default: 'text-title-h6',
      title: 'text-title-h6',
    },
  },
  hack: {
    tag: 'code',
    selector: {
      default: 'text-mono-hack',
      mono: 'text-mono-hack',
    },
  },
  label: {
    tag: 'label',
    selector: {
      default: 'text-info-label',
      info: 'text-info-label',
    },
  },
  option: {
    tag: 'label',
    selector: {
      default: 'text-info-option',
      info: 'text-info-option',
    },
  },
  paragraph: {
    tag: 'p',
    selector: {
      default: 'text-info-paragraph',
      secondary: 'text-secondary-paragraph',
      info: 'text-info-paragraph',
      read: 'text-read-paragraph',
    },
  },
  tip: {
    tag: 'span',
    selector: {
      default: 'text-info-tip',
      info: 'text-info-tip',
    },
  },
};

const mdsTextCss = ".text-title-h1{font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:3rem;line-height:1;font-weight:800;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-title-h2{font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:2.25rem;line-height:2.5rem;font-weight:800;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-title-h3{font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1.875rem;line-height:2.25rem;font-weight:800;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-title-h4{font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1.5rem;line-height:2rem;font-weight:700;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-title-h5{font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1.25rem;line-height:1.75rem;font-weight:700;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-title-h6{font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1rem;line-height:1.5rem;font-weight:700;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-title-action{font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.875rem;line-height:1.25rem;font-weight:700;line-height:1.625;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-info-paragraph{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1.25rem;line-height:2rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-info-detail{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-info-caption{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-info-label{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.75rem;line-height:1rem;font-weight:700;text-transform:uppercase;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-info-option{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.625rem;font-weight:700;text-transform:uppercase;line-height:1;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-info-tip{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.75rem;line-height:1rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-read-paragraph{font-family:'Merriweather', Times, 'Times New Roman', serif;font-size:1.25rem;line-height:2rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-read-detail{font-family:'Merriweather', Times, 'Times New Roman', serif;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-read-caption{font-family:'Merriweather', Times, 'Times New Roman', serif;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-mono-code{font-family:'Roboto Mono', monospace;font-size:1rem;line-height:1.5rem;line-height:1.625;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text-mono-hack{font-family:'Roboto Mono', monospace;font-size:0.875rem;line-height:1.25rem;line-height:1.625;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.text::-moz-selection{background-color:var(--selection-background, rgb(var(--label-sky-09)));color:var(--selection-color, rgb(var(--label-sky-01)))}.text::selection{background-color:var(--selection-background, rgb(var(--label-sky-09)));color:var(--selection-color, rgb(var(--label-sky-01)))}:host(.text-mono-code){font-family:'Roboto Mono', monospace;font-size:1rem;line-height:1.5rem;line-height:1.625;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-mono-hack){font-family:'Roboto Mono', monospace;font-size:0.875rem;line-height:1.25rem;line-height:1.625;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-title-h1){font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:3rem;line-height:1;font-weight:800;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-title-h2){font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:2.25rem;line-height:2.5rem;font-weight:800;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-title-h3){font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1.875rem;line-height:2.25rem;font-weight:800;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-title-h4){font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1.5rem;line-height:2rem;font-weight:700;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-title-h5){font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1.25rem;line-height:1.75rem;font-weight:700;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-title-h6){font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1rem;line-height:1.5rem;font-weight:700;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-title-action){font-family:Roboto, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.875rem;line-height:1.25rem;font-weight:700;line-height:1.625;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-info-paragraph){font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1.25rem;line-height:2rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-info-detail){font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-info-caption){font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-info-label){font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.75rem;line-height:1rem;font-weight:700;text-transform:uppercase;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-info-tip){font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.75rem;line-height:1rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-info-option){font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:0.625rem;font-weight:700;text-transform:uppercase;line-height:1;letter-spacing:-0.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-read-paragraph){font-family:'Merriweather', Times, 'Times New Roman', serif;font-size:1.25rem;line-height:2rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-read-detail){font-family:'Merriweather', Times, 'Times New Roman', serif;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host(.text-read-caption){font-family:'Merriweather', Times, 'Times New Roman', serif;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.text{display:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}:host(.article),:host(.blockquote),:host(.dd),:host(.details),:host(.div),:host(.dl),:host(.dt),:host(.figcaption),:host(.h1),:host(.h2),:host(.h3),:host(.h4),:host(.h5),:host(.h6),:host(.label),:host(.legend),:host(.li),:host(.ol),:host(.p),:host(.pre),:host(.summary),:host(.ul){display:block}:host(.abbr),:host(.address),:host(.b),:host(.bdo),:host(.cite),:host(.code),:host(.del),:host(.dfn),:host(.em),:host(.i),:host(.ins),:host(.kbd),:host(.mark),:host(.q),:host(.rb),:host(.rt),:host(.ruby),:host(.s),:host(.samp),:host(.small),:host(.span),:host(.strong),:host(.sub),:host(.sup),:host(.time),:host(.u),:host(.var){display:inline;line-height:inherit}:host(.code){border-radius:0.25rem;--tw-bg-opacity:1;background-color:rgba(var(--tone-neutral-09), var(--tw-bg-opacity));padding-left:0.25rem;padding-right:0.25rem;--tw-text-opacity:1;color:rgba(var(--tone-neutral-03), var(--tw-text-opacity));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}abbr,address,article,b,bdo,blockquote,cite,code,dd,del,details,dfn,div,dl,dt,em,figcaption,h1,h2,h3,h4,h5,h6,i,ins,kbd,label,legend,li,mark,ol,p,pre,q,rb,rt,ruby,s,samp,small,span,strong,sub,summary,sup,time,u,ul,var,wbr{margin:0;overflow:inherit;text-overflow:inherit}";

const MdsText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    /**
     * Specifies the font typography of the element
     */
    this.typography = 'detail';
  }
  render() {
    const Tag = this.tag !== undefined ? this.tag : typographyDefaultsVariant[this.typography].tag;
    const { selector } = typographyDefaultsVariant[this.typography];
    const selectorVariant = this.variant === undefined || !selector[this.variant] ? selector.default : selector[this.variant];
    return (h(Host, { class: clsx(selectorVariant, Tag) }, h(Tag, { class: "text" }, h("slot", null))));
  }
  static get style() { return mdsTextCss; }
}, [1, "mds-text", {
    "tag": [1],
    "typography": [1],
    "variant": [1]
  }]);
function defineCustomElement() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["mds-text"];
  components.forEach(tagName => { switch (tagName) {
    case "mds-text":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, MdsText);
      }
      break;
  } });
}
defineCustomElement();

export { MdsText as M, clsx as c, defineCustomElement as d };
