import { UiElement } from "./ui-element";

export class ButtonInput extends UiElement {
    constructor(
        //private label: string,
        private elementId: string,
        private value: any,
        private containerId: string,
        private disabled: string) {
        super(elementId, containerId, '');
        this.createElement(this.getTemplate());

    }

    public getTemplate() {
        if (this.disabled == "N") { this.disabled = "disabled" } else { this.disabled = "" }
        const template =
            "<div class='custom-button-element'>" +
            "<ion-button color='customnavy' expand='block' id='" + this.elementId + "' value='" + this.value + "' " + this.disabled + " style='border-radius: 3px; padding: 0 1.1em; min-height: 45px;'>Submit</ion-button>" +
            "</div> ";
        return template;
    }
}