// #region Imports
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Appearanceable } from '../../../Behaviors/Appearanceable';
import { Disableable } from '../../../Behaviors/Disableable';
import { Themeable } from '../../../Behaviors/Themeable';
import { Variantable } from '../../../Behaviors/Variantable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { CheckType } from '../../../Types/CheckType';
import { CustomElement } from '../../Abstracts/CustomElement';
import { checkmarkElementTemplate } from './CheckmarkElementTemplate';
import { checkmarkElementCosmopolitanStyle } from './Themes/CheckmarkElement.Cosmopolitan';
import { checkmarkElementJoyStyle } from './Themes/CheckmarkElement.Joy';
import { checkmarkElementMemphisStyle } from './Themes/CheckmarkElement.Memphis';
// #endregion
/**
 * Checkmark - A visual indicator for selection states in checkboxes, radio buttons, and list items.
 *
 * @description
 * The Checkmark component provides a versatile visual indicator for checked states in interactive
 * controls. It supports two-state (checked/unchecked) and three-state (checked/unchecked/indeterminate)
 * modes, multiple check types (checkmark, cross, dot), and can be styled with different appearances
 * and color variants. The component automatically adapts its visual representation based on the checked
 * state and type properties, making it ideal for custom checkbox and radio button implementations.
 *
 * @name Checkmark
 * @element mosaik-checkmark
 * @category Primitives
 *
 * @csspart checkmark - The main checkmark indicator element
 *
 * @cssprop {String} --checkmark-background-color - Background color of the checkmark box
 * @cssprop {String} --checkmark-border-color - Border color of the checkmark outline
 * @cssprop {String} --checkmark-border-radius - Corner rounding radius
 * @cssprop {String} --checkmark-border-style - Border line style
 * @cssprop {String} --checkmark-border-width - Border thickness
 * @cssprop {String} --checkmark-box-size - Size of the checkmark box
 * @cssprop {String} --checkmark-font-family - Font family for symbol rendering
 * @cssprop {String} --checkmark-font-letter-spacing - Letter spacing for the checkmark symbol
 * @cssprop {String} --checkmark-font-line-height - Line height for the checkmark symbol
 * @cssprop {String} --checkmark-font-size - Font size for the checkmark symbol
 * @cssprop {String} --checkmark-font-text-decoration - Text decoration style
 * @cssprop {String} --checkmark-font-text-transform - Text transformation style
 * @cssprop {String} --checkmark-font-weight - Font weight for the checkmark symbol
 * @cssprop {String} --checkmark-foreground-color - Color of the checkmark symbol
 * @cssprop {String} --checkmark-gap - Internal spacing within the checkmark
 * @cssprop {String} --checkmark-height - Height of the checkmark element
 * @cssprop {String} --checkmark-padding-bottom - Bottom padding inside the checkmark
 * @cssprop {String} --checkmark-padding-left - Left padding inside the checkmark
 * @cssprop {String} --checkmark-padding-right - Right padding inside the checkmark
 * @cssprop {String} --checkmark-padding-top - Top padding inside the checkmark
 * @cssprop {String} --checkmark-shadow - Drop shadow or elevation effect
 * @cssprop {String} --checkmark-shadow-blur - The shadow blur CSS custom property.
 * @cssprop {String} --checkmark-shadow-color - The shadow color CSS custom property.
 * @cssprop {String} --checkmark-shadow-offset-x - The shadow offset x CSS custom property.
 * @cssprop {String} --checkmark-shadow-offset-y - The shadow offset y CSS custom property.
 * @cssprop {String} --checkmark-shadow-spread - The shadow spread CSS custom property.
 * @cssprop {String} --checkmark-thickness - Stroke thickness for the checkmark symbol
 * @cssprop {String} --checkmark-transition-duration - Duration of state transitions
 * @cssprop {String} --checkmark-transition-mode - Timing function for transitions
 * @cssprop {String} --checkmark-transition-property - CSS properties to transition
 * @cssprop {String} --checkmark-translate - Transform translation value
 * @cssprop {String} --checkmark-width - Width of the checkmark element
 *
 * @example
 * Basic checked checkmark:
 * ```html
 * <mosaik-checkmark checked></mosaik-checkmark>
 * ```
 *
 * @example
 * Indeterminate state (three-state - set checked to null via JavaScript):
 * ```html
 * <mosaik-checkmark is-three-state></mosaik-checkmark>
 * ```
 *
 * @example
 * Radio button style with dot:
 * ```html
 * <mosaik-checkmark checked type="dot" variant="primary"></mosaik-checkmark>
 * ```
 *
 * @example
 * Custom styled checkmark:
 * ```html
 * <mosaik-checkmark
 *   checked
 *   appearance="solid"
 *   variant="success"
 *   type="checkmark">
 * </mosaik-checkmark>
 * ```
 *
 * @example
 * Disabled checkmark:
 * ```html
 * <mosaik-checkmark checked disabled></mosaik-checkmark>
 * ```
 *
 * @public
 */
let CheckmarkElement = class CheckmarkElement extends Themeable(Disableable(Variantable(Appearanceable(CustomElement)))) {
    // #region Fields
    _checked;
    _type;
    _isThreeState;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._checked = false;
        this._type = null;
        this._isThreeState = false;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
    */
    static get is() {
        return 'mosaik-checkmark';
    }
    /**
     * Gets or sets the `checked` property.
     *
     * @public
     * @attr
     */
    get checked() {
        return this._checked;
    }
    set checked(value) {
        if (this._checked !== value) {
            this._checked = value;
            this.requestUpdate('checked');
        }
    }
    /**
     * Gets or sets the `type` property.
     *
     * @public
     * @attr
     */
    get type() {
        return this._type;
    }
    set type(value) {
        if (this._type !== value) {
            this._type = value;
            this.requestUpdate('type');
        }
    }
    /**
     * Gets or sets the `isThreeState` property.
     *
     * @public
     * @attr
     */
    get isThreeState() { return this._isThreeState; }
    set isThreeState(value) {
        if (this._isThreeState !== value) {
            this._isThreeState = value;
            this.requestUpdate('isThreeState');
        }
    }
};
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true,
        converter: {
            toAttribute: (value) => String(value)
            // fromAttribute: (value: string | null): boolean | null => value === 'true'
        }
    }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], CheckmarkElement.prototype, "checked", null);
__decorate([
    Attribute({ type: CheckType }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], CheckmarkElement.prototype, "type", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], CheckmarkElement.prototype, "isThreeState", null);
CheckmarkElement = __decorate([
    Component({
        selector: 'mosaik-checkmark',
        template: checkmarkElementTemplate,
        themes: {
            joy: checkmarkElementJoyStyle,
            memphis: checkmarkElementMemphisStyle,
            cosmopolitan: checkmarkElementCosmopolitanStyle
        },
        imports: []
    }),
    __metadata("design:paramtypes", [])
], CheckmarkElement);
export { CheckmarkElement };
//# sourceMappingURL=CheckmarkElement.js.map