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 { MelodicComponent } from '@melodicdev/core';
import { listItemTemplate } from './list-item.template.js';
import { listItemStyles } from './list-item.styles.js';
/**
 * ml-list-item - Individual item within a list
 *
 * @example
 * ```html
 * <ml-list-item primary="Phoenix Baker" secondary="Member since Feb 2025">
 *   <ml-avatar slot="leading" initials="PB"></ml-avatar>
 *   <ml-badge slot="trailing" variant="pill" color="success">Active</ml-badge>
 * </ml-list-item>
 * ```
 *
 * @slot leading - Left side content (avatars, icons, images)
 * @slot default - Main content (overrides primary/secondary text)
 * @slot trailing - Right side content (badges, indicators, actions)
 */
let ListItemComponent = class ListItemComponent {
    constructor() {
        /** Primary text */
        this.primary = '';
        /** Secondary text */
        this.secondary = '';
        /** Disable the item */
        this.disabled = false;
        /** Enable hover/focus states for clickable items */
        this.interactive = false;
    }
    /** Check if leading slot has content */
    get hasLeadingSlot() {
        return this.elementRef?.querySelector('[slot="leading"]') !== null;
    }
    /** Check if trailing slot has content */
    get hasTrailingSlot() {
        return this.elementRef?.querySelector('[slot="trailing"]') !== null;
    }
};
ListItemComponent = __decorate([
    MelodicComponent({
        selector: 'ml-list-item',
        template: listItemTemplate,
        styles: listItemStyles,
        attributes: ['primary', 'secondary', 'disabled', 'interactive']
    })
], ListItemComponent);
export { ListItemComponent };
