// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import '//resources/cr_elements/cr_button/cr_button.js';
import '//resources/cr_elements/cr_checkbox/cr_checkbox.js';
import '//resources/cr_elements/cr_icon_button/cr_icon_button.js';
import '//resources/cr_elements/cr_input/cr_input.js';
import '//resources/cr_elements/cr_textarea/cr_textarea.js';
import { CrLitElement } from '//resources/lit/v3_0/lit.rollup.js';
import { getCss } from './cr_input_demo.css.js';
import { getHtml } from './cr_input_demo.html.js';
export class CrInputDemoElement extends CrLitElement {
    static get is() {
        return 'cr-input-demo';
    }
    static get styles() {
        return getCss();
    }
    render() {
        return getHtml.bind(this)();
    }
    static get properties() {
        return {
            autogrowTextarea_: { type: Boolean },
            emailValue_: { type: String },
            numberValue_: { type: String },
            pinValue_: { type: String },
            searchValue_: { type: String },
            textValue_: { type: String },
            textareaValue_: { type: String },
        };
    }
    #autogrowTextarea__accessor_storage = false;
    get autogrowTextarea_() { return this.#autogrowTextarea__accessor_storage; }
    set autogrowTextarea_(value) { this.#autogrowTextarea__accessor_storage = value; }
    #emailValue__accessor_storage = '';
    get emailValue_() { return this.#emailValue__accessor_storage; }
    set emailValue_(value) { this.#emailValue__accessor_storage = value; }
    #numberValue__accessor_storage = '';
    get numberValue_() { return this.#numberValue__accessor_storage; }
    set numberValue_(value) { this.#numberValue__accessor_storage = value; }
    #pinValue__accessor_storage = '';
    get pinValue_() { return this.#pinValue__accessor_storage; }
    set pinValue_(value) { this.#pinValue__accessor_storage = value; }
    #searchValue__accessor_storage = '';
    get searchValue_() { return this.#searchValue__accessor_storage; }
    set searchValue_(value) { this.#searchValue__accessor_storage = value; }
    #textValue__accessor_storage = '';
    get textValue_() { return this.#textValue__accessor_storage; }
    set textValue_(value) { this.#textValue__accessor_storage = value; }
    #textareaValue__accessor_storage = '';
    get textareaValue_() { return this.#textareaValue__accessor_storage; }
    set textareaValue_(value) { this.#textareaValue__accessor_storage = value; }
    onClearSearchClick_() {
        this.searchValue_ = '';
    }
    onValidateClick_() {
        this.$.numberInput.validate();
    }
    onTextValueChanged_(e) {
        this.textValue_ = e.detail.value;
    }
    onSearchValueChanged_(e) {
        this.searchValue_ = e.detail.value;
    }
    onEmailValueChanged_(e) {
        this.emailValue_ = e.detail.value;
    }
    onNumberValueChanged_(e) {
        this.numberValue_ = e.detail.value;
    }
    onPinValueChanged_(e) {
        this.pinValue_ = e.detail.value;
    }
    onTextareaValueChanged_(e) {
        this.textareaValue_ = e.detail.value;
    }
    onAutogrowTextareaCheckedChanged_(e) {
        this.autogrowTextarea_ = e.detail.value;
    }
}
export const tagName = CrInputDemoElement.is;
customElements.define(CrInputDemoElement.is, CrInputDemoElement);
