/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */
class CropperSettings {
    // From options
    format = 'png';
    maintainAspectRatio = true;
    transform = {};
    aspectRatio = 1;
    resizeToWidth = 0;
    resizeToHeight = 0;
    cropperMinWidth = 0;
    cropperMinHeight = 0;
    cropperMaxHeight = 0;
    cropperMaxWidth = 0;
    cropperStaticWidth = 0;
    cropperStaticHeight = 0;
    canvasRotation = 0;
    initialStepSize = 3;
    roundCropper = false;
    onlyScaleDown = false;
    imageQuality = 92;
    autoCrop = true;
    backgroundColor = null;
    containWithinAspectRatio = false;
    hideResizeSquares = false;
    alignImage = 'center';
    // Internal
    cropperScaledMinWidth = 20;
    cropperScaledMinHeight = 20;
    cropperScaledMaxWidth = 20;
    cropperScaledMaxHeight = 20;
    stepSize = this.initialStepSize;
    setOptions(options) {
        Object.keys(options)
            .filter((k) => k in this)
            .forEach((k) => (this[k] = options[k]));
        this.validateOptions();
    }
    setOptionsFromChanges(changes) {
        Object.keys(changes)
            .filter((k) => k in this)
            .forEach((k) => (this[k] = changes[k].currentValue));
        this.validateOptions();
    }
    validateOptions() {
        if (this.maintainAspectRatio && !this.aspectRatio) {
            throw new Error('`aspectRatio` should > 0 when `maintainAspectRatio` is enabled');
        }
    }
}

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */
var MoveTypes;
(function (MoveTypes) {
    MoveTypes["Drag"] = "drag";
    MoveTypes["Move"] = "move";
    MoveTypes["Resize"] = "resize";
    MoveTypes["Pinch"] = "pinch";
})(MoveTypes || (MoveTypes = {}));

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */
const aswEditorConfig = {
    editable: true,
    spellcheck: true,
    height: 'auto',
    minHeight: '0',
    maxHeight: 'auto',
    width: 'auto',
    minWidth: '0',
    translate: 'yes',
    enableToolbar: true,
    showToolbar: true,
    placeholder: 'Enter text here...',
    defaultParagraphSeparator: '',
    defaultFontSize: '',
    uploadUrl: 'v1/image',
    uploadWithCredentials: false,
    sanitize: true,
    toolbarPosition: 'top',
    outline: true
};

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */

var CSSFrameworkEnum;
(function (CSSFrameworkEnum) {
    CSSFrameworkEnum["Material"] = "material";
    CSSFrameworkEnum["Bootstrap"] = "bootstrap";
})(CSSFrameworkEnum || (CSSFrameworkEnum = {}));

var ControlPersonalizationEnum;
(function (ControlPersonalizationEnum) {
    ControlPersonalizationEnum["Header"] = "header";
    ControlPersonalizationEnum["TextField"] = "textfield";
    ControlPersonalizationEnum["TextArea"] = "textarea";
    ControlPersonalizationEnum["Paragraph"] = "paragraph";
    ControlPersonalizationEnum["Divider"] = "divider";
    ControlPersonalizationEnum["SlideToggle"] = "slide-toggle";
    ControlPersonalizationEnum["Button"] = "button";
    ControlPersonalizationEnum["Autocomplete"] = "autocomplete";
    ControlPersonalizationEnum["Select"] = "select";
    ControlPersonalizationEnum["MultiSelect"] = "multi-select";
    ControlPersonalizationEnum["Radio"] = "radio";
    ControlPersonalizationEnum["Checkbox"] = "checkbox";
    ControlPersonalizationEnum["Number"] = "number";
    ControlPersonalizationEnum["Currency"] = "currency";
    ControlPersonalizationEnum["Calculation"] = "calculation";
    ControlPersonalizationEnum["Email"] = "email";
    ControlPersonalizationEnum["PhoneNumber"] = "phone-number";
    ControlPersonalizationEnum["Tags"] = "tags";
    ControlPersonalizationEnum["URL"] = "url";
    ControlPersonalizationEnum["Datepicker"] = "datepicker";
    ControlPersonalizationEnum["GPS"] = "gps";
    ControlPersonalizationEnum["Fileupload"] = "fileupload";
    ControlPersonalizationEnum["Image"] = "image";
    ControlPersonalizationEnum["Signature"] = "signature";
    ControlPersonalizationEnum["Drawing"] = "drawing";
    ControlPersonalizationEnum["QRCode"] = "qr-code";
    ControlPersonalizationEnum["Columns"] = "columns";
})(ControlPersonalizationEnum || (ControlPersonalizationEnum = {}));

var PropertyPersonalizationEnum;
(function (PropertyPersonalizationEnum) {
    PropertyPersonalizationEnum["UniqueId"] = "uniqueId";
    PropertyPersonalizationEnum["CustomCSSClass"] = "customCSSClass";
    PropertyPersonalizationEnum["InputMask"] = "inputMask";
    PropertyPersonalizationEnum["InputMaskCustomErrorMsg"] = "inputMaskCustomErrorMsg";
    PropertyPersonalizationEnum["MinLength"] = "minLength";
    PropertyPersonalizationEnum["MaxLength"] = "maxLength";
})(PropertyPersonalizationEnum || (PropertyPersonalizationEnum = {}));

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */

/**
 * Generated bundle index. Do not edit.
 */

export { CSSFrameworkEnum, ControlPersonalizationEnum, CropperSettings, MoveTypes, PropertyPersonalizationEnum, aswEditorConfig };
//# sourceMappingURL=asoftwareworld-form-builder-pro-api.mjs.map
