/**
@license
Copyright (c) 2018 Vaadin Ltd.
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import"../../../@polymer/polymer/polymer-element.js";import"../../../@polymer/polymer/lib/elements/custom-style.js";import{TextFieldElement as e}from"./vaadin-text-field.js";import{DomModule as t}from"../../../@polymer/polymer/lib/elements/dom-module.js";import{html as l}from"../../../@polymer/polymer/lib/utils/html-tag.js";const i=l`<dom-module id="vaadin-email-field-template">
  <template>
    <style>
      :host([dir="rtl"]) [part="input-field"] {
        direction: ltr;
      }

      :host([dir="rtl"]) [part="value"]::placeholder {
        direction: rtl;
        text-align: left;
      }

      :host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {
        direction: rtl;
        text-align: left;
      }

      :host([dir="rtl"]) [part="value"]:-ms-input-placeholder,
      :host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {
        direction: rtl;
        text-align: left;
      }
    </style>
  </template>
  
</dom-module>`;let r;document.head.appendChild(i.content);class EmailFieldElement extends e{static get is(){return"vaadin-email-field"}static get version(){return"2.10.0"}static get template(){if(!r){r=super.template.cloneNode(!0);const e=t.import(this.is+"-template","template").content.querySelector("style");r.content.appendChild(e)}return r}ready(){super.ready(),this.inputElement.type="email",this.inputElement.autocapitalize="off"}_createConstraintsObserver(){this.pattern=this.pattern||"^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9-.]+\\.[a-zA-Z0-9-]{2,}$",super._createConstraintsObserver()}}customElements.define(EmailFieldElement.is,EmailFieldElement);export{EmailFieldElement};