// #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;
};
import { Themeable } from '../../../Behaviors/Themeable';
import { Component } from '../../../Decorators/ComponentDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { dropdownAnchorElementTemplate } from './DropdownAnchorElementTemplate';
import { dropdownAnchorElementCosmopolitanStyle } from './Themes/DropdownAnchorElement.Cosmopolitan';
import { dropdownAnchorElementJoyStyle } from './Themes/DropdownAnchorElement.Joy';
import { dropdownAnchorElementMemphisStyle } from './Themes/DropdownAnchorElement.Memphis';
// #endregion
/**
 * Dropdown Anchor - A declarative alias element that projects its children into the anchor area of a Dropdown.
 *
 * @description
 * DropdownAnchor is a convenience wrapper that automatically assigns itself to the anchor slot
 * of a parent Dropdown. It does not own any dropdown behavior, positioning, open state, or
 * animation orchestration. Its only responsibility is to project its children into the correct slot.
 *
 * @name Dropdown Anchor
 * @element mosaik-dropdown-anchor
 * @category Primitives
 *
 * @slot - The default slot for anchor content.
 *
 * @example
 * ```html
 * <mosaik-dropdown placement="bottom-start">
 *   <mosaik-dropdown-anchor>
 *     <mosaik-button>Actions</mosaik-button>
 *   </mosaik-dropdown-anchor>
 *   <mosaik-dropdown-panel>
 *     <mosaik-menu>
 *       <mosaik-menu-item label="Edit"></mosaik-menu-item>
 *       <mosaik-menu-item label="Delete"></mosaik-menu-item>
 *     </mosaik-menu>
 *   </mosaik-dropdown-panel>
 * </mosaik-dropdown>
 * ```
 *
 * @public
 */
let DropdownAnchorElement = class DropdownAnchorElement extends Themeable(CustomElement) {
    // #region Methods
    /**
     * @public
     * @override
     */
    connectedCallback() {
        if (!this.hasAttribute('slot')) {
            this.setAttribute('slot', 'anchor');
        }
        super.connectedCallback();
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     * The `is` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-dropdown-anchor';
    }
};
DropdownAnchorElement = __decorate([
    Component({
        selector: 'mosaik-dropdown-anchor',
        template: dropdownAnchorElementTemplate,
        themes: {
            joy: dropdownAnchorElementJoyStyle,
            memphis: dropdownAnchorElementMemphisStyle,
            cosmopolitan: dropdownAnchorElementCosmopolitanStyle
        },
        host: {
            slot: 'anchor'
        },
        options: {
            mode: 'open'
        }
    })
], DropdownAnchorElement);
export { DropdownAnchorElement };
//# sourceMappingURL=DropdownAnchorElement.js.map