// #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 { Component } from '../../../Decorators/ComponentDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { ghostElementTemplate } from './GhostElementTemplate';
import { Themeable } from '../../../Behaviors/Themeable';
import { Dimensionable } from '../../../Behaviors/Dimensionable';
import { CssLength } from '@breadstone/mosaik-themes';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { ghostElementJoyStyle } from './themes/GhostElement.Joy';
import { ghostElementMemphisStyle } from './themes/GhostElement.Memphis';
import { ghostElementCosmopolitanStyle } from './themes/GhostElement.Cosmopolitan';
// #endregion
/**
 * Ghost - An invisible positioned placeholder element for drag-and-drop and positional references.
 *
 * @description
 * The Ghost component creates an invisible, absolutely positioned element that serves as a positional
 * reference or placeholder. It's commonly used in drag-and-drop scenarios to show where an item will
 * be dropped, as a measurement reference for dynamic layouts, or as an anchor point for absolutely
 * positioned content. The element supports custom dimensions and positioning through top, left, width,
 * and height properties.
 *
 * @name Ghost
 * @element mosaik-ghost
 * @category Primitives
 *
 * @slot - The default content slot (typically empty or used for hidden reference content)
 *
 * @cssprop {String} --ghost-background-color - Background color of the ghost element
 * @cssprop {String} --ghost-border-color - Border color for the ghost outline
 * @cssprop {String} --ghost-border-radius - Corner rounding radius
 * @cssprop {String} --ghost-border-style - Border line style
 * @cssprop {String} --ghost-border-width - Border thickness
 * @cssprop {String} --ghost-font-family - The font family CSS custom property.
 * @cssprop {String} --ghost-font-letter-spacing - The font letter spacing CSS custom property.
 * @cssprop {String} --ghost-font-line-height - The font line height CSS custom property.
 * @cssprop {String} --ghost-font-size - The font size CSS custom property.
 * @cssprop {String} --ghost-font-text-decoration - The font text decoration CSS custom property.
 * @cssprop {String} --ghost-font-text-transform - The font text transform CSS custom property.
 * @cssprop {String} --ghost-font-weight - The font weight CSS custom property.
 * @cssprop {String} --ghost-gap - The gap CSS custom property.
 * @cssprop {String} --ghost-padding-bottom - The padding bottom CSS custom property.
 * @cssprop {String} --ghost-padding-left - The padding left CSS custom property.
 * @cssprop {String} --ghost-padding-right - The padding right CSS custom property.
 * @cssprop {String} --ghost-padding-top - The padding top CSS custom property.
 * @cssprop {String} --ghost-shadow - The shadow CSS custom property.
 * @cssprop {String} --ghost-shadow-blur - The shadow blur CSS custom property.
 * @cssprop {String} --ghost-shadow-color - The shadow color CSS custom property.
 * @cssprop {String} --ghost-shadow-offset-x - The shadow offset x CSS custom property.
 * @cssprop {String} --ghost-shadow-offset-y - The shadow offset y CSS custom property.
 * @cssprop {String} --ghost-shadow-spread - The shadow spread CSS custom property.
 * @cssprop {String} --ghost-transition-duration - Duration of visual transitions
 * @cssprop {String} --ghost-transition-mode - Timing function for transitions
 * @cssprop {String} --ghost-transition-property - CSS properties to transition
 * @cssprop {String} --ghost-translate - The translate CSS custom property.
 *
 * @example
 * Basic positioned ghost element:
 * ```html
 * <mosaik-ghost top="100px" left="50px" width="200px" height="150px"></mosaik-ghost>
 * ```
 *
 * @example
 * Drag-and-drop drop indicator:
 * ```html
 * <div class="drop-zone">
 *   <mosaik-ghost id="dropIndicator" style="display: none;"></mosaik-ghost>
 *   <div class="items">...</div>
 * </div>
 * <script>
 *   const ghost = document.querySelector('#dropIndicator');
 *   dropZone.addEventListener('dragover', (e) => {
 *     ghost.style.display = 'block';
 *     ghost.top = e.clientY + 'px';
 *     ghost.left = e.clientX + 'px';
 *   });
 * </script>
 * ```
 *
 * @example
 * Layout measurement reference:
 * ```html
 * <mosaik-ghost id="layoutAnchor" top="0" left="0" width="100%" height="auto"></mosaik-ghost>
 * ```
 *
 * @public
 */
let GhostElement = class GhostElement extends Themeable(Dimensionable(CustomElement)) {
    // #region Fields
    _top;
    _left;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._top = 0;
        this._left = 0;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     * The `is` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-ghost';
    }
    /**
     * Gets or sets the `top` property.
     *
     * @public
     * @attr
     */
    get top() {
        return this._top;
    }
    set top(value) {
        if (this._top !== value) {
            this._top = value;
            this.requestUpdate('top');
        }
    }
    /**
     * Gets or sets the `left` property.
     *
     * @public
     * @attr
     */
    get left() {
        return this._left;
    }
    set left(value) {
        if (this._left !== value) {
            this._left = value;
            this.requestUpdate('left');
        }
    }
};
__decorate([
    Attribute({
        type: String,
        converter: {
            toAttribute: (value) => typeof value === 'number' ? `${value}px` : value?.toString() ?? ''
        }
    }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], GhostElement.prototype, "top", null);
__decorate([
    Attribute({
        type: String,
        converter: {
            toAttribute: (value) => typeof value === 'number' ? `${value}px` : value?.toString() ?? ''
        }
    }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], GhostElement.prototype, "left", null);
GhostElement = __decorate([
    Component({
        selector: 'mosaik-ghost',
        template: ghostElementTemplate,
        themes: {
            joy: ghostElementJoyStyle,
            memphis: ghostElementMemphisStyle,
            cosmopolitan: ghostElementCosmopolitanStyle
        },
        imports: []
    }),
    __metadata("design:paramtypes", [])
], GhostElement);
export { GhostElement };
//# sourceMappingURL=GhostElement.js.map