import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { PropertyEditorBoolean } from "../../CommonUI/PropertyEditing/PropertyEditorBoolean";
import { Collapse } from "@material-ui/core";
import { PropertyEditorTextSizeSelection, PropertyEditorTextStyleSelection, } from "../../CommonUI/PropertyEditing/TextSelectionButtonGroups";
import { PropertyEditorText } from "../../CommonUI/PropertyEditing/PropertyEditorText";
import { BaseDataControl } from "./BaseDataControl";
import { PropertyEditorInteger } from "../../CommonUI/PropertyEditing/PropertyEditorInteger";
export class BaseTextEntryControl extends BaseDataControl {
    constructor() {
        super(...arguments);
        this.overrideStyle = false;
        this.fullWidth = true;
    }
    renderTextStyleSelectionEditor() {
        var _a, _b;
        return (_jsxs(_Fragment, { children: [_jsx(PropertyEditorBoolean, { editObject: this, label: "Override Text Style", propertyName: "overrideStyle", updateCallback: this.controlUpdate }, void 0),
                _jsxs(Collapse, Object.assign({ in: this.overrideStyle }, { children: [_jsx(PropertyEditorTextStyleSelection, { updateCallback: this.controlUpdate, propertyName: "style", editObject: this, parentDefaultValue: (_a = this.getFormContext()) === null || _a === void 0 ? void 0 : _a.form.defaultTextStyle }, void 0),
                        _jsx(PropertyEditorTextSizeSelection, { updateCallback: this.controlUpdate, propertyName: "size", editObject: this, parentDefaultValue: (_b = this.getFormContext()) === null || _b === void 0 ? void 0 : _b.form.defaultTextSize }, void 0)] }), void 0)] }, void 0));
    }
    renderTextControlBasePropertyEditor() {
        return (_jsxs(_Fragment, { children: [_jsx(PropertyEditorText, { label: "Hint Text", updateCallback: this.controlUpdate, propertyName: "hintText", editObject: this }, void 0),
                _jsx(PropertyEditorText, { label: "Placeholder Text", updateCallback: this.controlUpdate, propertyName: "placeholderText", editObject: this }, void 0),
                _jsx(PropertyEditorBoolean, { label: "Full Width", updateCallback: this.controlUpdate, propertyName: "fullWidth", editObject: this }, void 0),
                _jsx(Collapse, Object.assign({ in: !this.fullWidth }, { children: _jsx(PropertyEditorInteger, { label: "Width", updateCallback: this.controlUpdate, propertyName: "width", editObject: this }, void 0) }), void 0)] }, void 0));
    }
}
//# sourceMappingURL=BaseTextEntryControl.js.map