import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
import { d as defineCustomElement$2 } from './telia-vst2.js';

const targets = {
  BLANK: '_blank',
  SELF: '_self',
  PARENT: '_parent',
  TOP: '_top',
};

const teliaFormCss = ".telia-form{padding-bottom:calc(3.2rem * var(--voca-rem-multiplier))}.telia-form .telia-fieldset>telia-fieldset{display:block;margin-bottom:calc(4.8rem * var(--voca-rem-multiplier))}.telia-form .telia-fieldset>telia-fieldset:last-child{margin-bottom:0}.telia-form telia-heading{margin-bottom:calc(2.4rem * var(--voca-rem-multiplier))}.telia-form telia-p,.telia-form telia-notification,.telia-form telia-checkbox,.telia-form telia-text-input,.telia-form telia-textarea,.telia-form telia-toggle,.telia-form telia-select{display:block;margin-bottom:calc(2.4rem * var(--voca-rem-multiplier))}.telia-form telia-p:last-child,.telia-form telia-notification:last-child,.telia-form telia-checkbox:last-child,.telia-form telia-text-input:last-child,.telia-form telia-textarea:last-child,.telia-form telia-toggle:last-child,.telia-form telia-select:last-child{margin-bottom:0}.telia-form telia-fieldset{display:block;margin:calc(2.4rem * var(--voca-rem-multiplier)) 0 calc(4.8rem * var(--voca-rem-multiplier))}.telia-form legend~telia-fieldset{margin-top:0}";

const TeliaForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    /** 	Specifies where to display the response that is received after submitting the form, can be:_self (default), _blank, _parent, _top or 'framename* */
    this.target = targets.SELF;
    /** Specifies forms aria-label to provide proper accessbility support */
    this.allyLabel = null;
    /** Tracking id is used to identify and count Component usage. */
    this.dataTrackingId = 'telia-form';
  }
  render() {
    return (h("form", { class: "telia-form", name: this.name, autocomplete: this.autocomplete,
      /* @ts-ignore */
      rel: this.rel, action: this.action, enctype: this.enctype, method: this.method, target: this.target, novalidate: this.novalidate, id: this.htmlId, "aria-label": this.allyLabel }, h("slot", null), h("telia-vst", { dataTrackingId: this.dataTrackingId })));
  }
  static get style() { return teliaFormCss; }
}, [4, "telia-form", {
    "dataTestid": [1, "data-testid"],
    "htmlId": [1, "html-id"],
    "autocomplete": [1],
    "name": [1],
    "rel": [1],
    "action": [1],
    "enctype": [1],
    "method": [1],
    "target": [1],
    "novalidate": [4],
    "allyLabel": [1, "ally-label"]
  }]);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["telia-form", "telia-vst"];
  components.forEach(tagName => { switch (tagName) {
    case "telia-form":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, TeliaForm$1);
      }
      break;
    case "telia-vst":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
  } });
}
defineCustomElement$1();

const TeliaForm = TeliaForm$1;
const defineCustomElement = defineCustomElement$1;

export { TeliaForm, defineCustomElement };
