import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
import { o as openWormhole } from './consumer.js';
import { d as defineCustomElement$4 } from './sc-form-control2.js';
import { d as defineCustomElement$3 } from './sc-input2.js';
import { d as defineCustomElement$2 } from './sc-tooltip2.js';

const ScOrderPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    /** The input's size. */
    this.size = 'medium';
    /** The input's value attribute. */
    this.value = '';
    /** Draws a pill-style input with rounded edges. */
    this.pill = false;
    /** Should we show the label */
    this.showLabel = true;
    /** The input's help text. */
    this.help = '';
    /** Disables the input. */
    this.disabled = false;
    /** Makes the input readonly. */
    this.readonly = false;
    /** Makes the input a required field. */
    this.required = false;
  }
  async reportValidity() {
    return this.input.reportValidity();
  }
  render() {
    if (this.loggedIn) {
      return null;
    }
    return (h("sc-input", { ref: el => (this.input = el), label: this.label, help: this.help, autofocus: this.autofocus, placeholder: this.placeholder, showLabel: this.showLabel, size: this.size ? this.size : 'medium', type: "password", name: "password", value: this.value, required: this.required, disabled: this.disabled }));
  }
}, [1, "sc-order-password", {
    "loggedIn": [4, "logged-in"],
    "size": [513],
    "value": [1025],
    "pill": [516],
    "label": [1],
    "showLabel": [4, "show-label"],
    "help": [1],
    "placeholder": [1],
    "disabled": [516],
    "readonly": [516],
    "required": [516],
    "autofocus": [4],
    "reportValidity": [64]
  }]);
openWormhole(ScOrderPassword$1, ['loggedIn'], false);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["sc-order-password", "sc-form-control", "sc-input", "sc-tooltip"];
  components.forEach(tagName => { switch (tagName) {
    case "sc-order-password":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, ScOrderPassword$1);
      }
      break;
    case "sc-form-control":
      if (!customElements.get(tagName)) {
        defineCustomElement$4();
      }
      break;
    case "sc-input":
      if (!customElements.get(tagName)) {
        defineCustomElement$3();
      }
      break;
    case "sc-tooltip":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
  } });
}
defineCustomElement$1();

const ScOrderPassword = ScOrderPassword$1;
const defineCustomElement = defineCustomElement$1;

export { ScOrderPassword, defineCustomElement };
