import * as i0 from '@angular/core';
import { input, booleanAttribute, contentChild, computed, Component } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';

class List {
    // Input for the data array to loop through
    data = input([], ...(ngDevMode ? [{ debugName: "data" }] : []));
    separated = input(false, { ...(ngDevMode ? { debugName: "separated" } : {}), transform: booleanAttribute });
    // Content child to get the template from ng-content
    itemTemplate = contentChild('item', ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
    // Alternative input for template reference
    template = input(null, ...(ngDevMode ? [{ debugName: "template" }] : []));
    // Computed signal for effective template (prioritize template() input over content child)
    effectiveTemplate = computed(() => {
        return this.template() || this.itemTemplate() || null;
    }, ...(ngDevMode ? [{ debugName: "effectiveTemplate" }] : []));
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: List, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: List, isStandalone: true, selector: "mt-list", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, separated: { classPropertyName: "separated", publicName: "separated", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"template-list\">\r\n  @if (effectiveTemplate()) {\r\n    @for (item of data(); track $index) {\r\n      <div\r\n        class=\"border-(--p-content-border-color)\"\r\n        [class.border-b]=\"!$last && separated()\"\r\n      >\r\n        <ng-container\r\n          [ngTemplateOutlet]=\"effectiveTemplate()\"\r\n          [ngTemplateOutletContext]=\"{\r\n            $implicit: item,\r\n            index: $index,\r\n            first: $first,\r\n            last: $last,\r\n            count: $count,\r\n          }\"\r\n        >\r\n        </ng-container>\r\n      </div>\r\n    }\r\n  }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: List, decorators: [{
            type: Component,
            args: [{ selector: 'mt-list', standalone: true, imports: [CommonModule], template: "<div class=\"template-list\">\r\n  @if (effectiveTemplate()) {\r\n    @for (item of data(); track $index) {\r\n      <div\r\n        class=\"border-(--p-content-border-color)\"\r\n        [class.border-b]=\"!$last && separated()\"\r\n      >\r\n        <ng-container\r\n          [ngTemplateOutlet]=\"effectiveTemplate()\"\r\n          [ngTemplateOutletContext]=\"{\r\n            $implicit: item,\r\n            index: $index,\r\n            first: $first,\r\n            last: $last,\r\n            count: $count,\r\n          }\"\r\n        >\r\n        </ng-container>\r\n      </div>\r\n    }\r\n  }\r\n</div>\r\n" }]
        }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], separated: [{ type: i0.Input, args: [{ isSignal: true, alias: "separated", required: false }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }] } });

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

export { List };
//# sourceMappingURL=masterteam-components-list.mjs.map
