import { ChangeDetectionStrategy, Component } from '@angular/core';
import { of } from 'rxjs';
import { DbxWidgetViewComponent } from './widget.component';
import { AbstractDbxValueListViewItemComponent } from '../../layout/list/list.view.value.item.directive';
import { AbstractDbxListGridViewDirective, DbxListGridViewDirectiveImportsModule, DEFAULT_DBX_LIST_GRID_VIEW_DIRECTIVE_TEMPLATE } from '../../layout/list/grid/list.grid.view.directive';
import { provideDbxListView } from '../../layout/list/list.view';
import { AbstractDbxListWrapperDirective, DbxListWrapperComponentImportsModule, DEFAULT_LIST_WRAPPER_COMPONENT_CONFIGURATION_TEMPLATE } from '../../layout/list/list.directive';
import * as i0 from "@angular/core";
import * as i1 from "../../layout/list/list.component";
import * as i2 from "../../layout/list/grid/list.grid.view.component";
/**
 * Demo DbxSelectionListWrapperDirective
 */
export class DbxWidgetListGridComponent extends AbstractDbxListWrapperDirective {
    constructor() {
        super({
            componentClass: DbxWidgetListGridViewComponent,
            defaultSelectionMode: 'view'
        });
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxWidgetListGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxWidgetListGridComponent, isStandalone: true, selector: "dbx-widget-grid", usesInheritance: true, ngImport: i0, template: "\n  <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabled()\" [selectionMode]=\"selectionModeSignal()\">\n    <ng-content top select=\"[top]\"></ng-content>\n    <ng-content bottom select=\"[bottom]\"></ng-content>\n    <ng-content empty select=\"[empty]\"></ng-content>\n    <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n    <ng-content end select=\"[end]\"></ng-content>\n  </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxWidgetListGridComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-widget-grid',
                    template: DEFAULT_LIST_WRAPPER_COMPONENT_CONFIGURATION_TEMPLATE,
                    imports: [DbxListWrapperComponentImportsModule],
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true
                }]
        }], ctorParameters: () => [] });
export class DbxWidgetListGridViewComponent extends AbstractDbxListGridViewDirective {
    config = {
        grid: {
            // TODO: Make configurable.
            columns: 'repeat(auto-fill, minmax(120px, 1fr))',
            gap: '8px'
        },
        componentClass: DbxWidgetListGridViewItemComponent,
        mapValuesToItemValues: (x) => of(x.map((y) => ({ ...y, itemValue: y })))
    };
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxWidgetListGridViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxWidgetListGridViewComponent, isStandalone: true, selector: "dbx-widget-grid-view", providers: provideDbxListView(DbxWidgetListGridViewComponent), usesInheritance: true, ngImport: i0, template: "<dbx-list-grid-view [config]=\"config\"></dbx-list-grid-view>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListGridViewDirectiveImportsModule }, { kind: "component", type: i2.DbxValueListGridViewComponent, selector: "dbx-list-grid-view" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxWidgetListGridViewComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-widget-grid-view',
                    template: DEFAULT_DBX_LIST_GRID_VIEW_DIRECTIVE_TEMPLATE,
                    imports: [DbxListGridViewDirectiveImportsModule],
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true,
                    providers: provideDbxListView(DbxWidgetListGridViewComponent)
                }]
        }] });
export class DbxWidgetListGridViewItemComponent extends AbstractDbxValueListViewItemComponent {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxWidgetListGridViewItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxWidgetListGridViewItemComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
    <dbx-widget-view [config]="itemValue"></dbx-widget-view>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxWidgetViewComponent, selector: "dbx-widget-view", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxWidgetListGridViewItemComponent, decorators: [{
            type: Component,
            args: [{
                    template: `
    <dbx-widget-view [config]="itemValue"></dbx-widget-view>
  `,
                    imports: [DbxWidgetViewComponent],
                    standalone: true,
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }] });
//# sourceMappingURL=data:application/json;base64, 