import { Component, Input, Output, EventEmitter } from '@angular/core';
import { SpaAppChannelTypeEnum } from '@softpak/ng-components/spa-app-configuration';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@softpak/frontend-components-ng";
export class SpaWelcomeComponent {
    constructor() {
        this.channels = [];
        this.spaSelected = new EventEmitter();
    }
    get filteredChannels() { return (this.channels ?? []).filter(channel => channel.channelTypes.includes(SpaAppChannelTypeEnum.production)); }
    onSelectChannel(channel) {
        this.spaSelected.emit(channel);
    }
}
SpaWelcomeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpaWelcomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
SpaWelcomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SpaWelcomeComponent, selector: "spa-welcome", inputs: { channels: "channels" }, outputs: { spaSelected: "spaSelected" }, ngImport: i0, template: `<div class="flex flex-col gap-3">
    <spn-button [spfFullWidth]="true" *ngFor="let channel of filteredChannels" (click)="onSelectChannel(channel)">
      {{ channel.brand }}
    </spn-button>
  </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.SpnButton, selector: "spn-button", inputs: ["spfClass", "spfClassObject", "spfDisabled", "spfForm", "spfFullHeight", "spfFullWidth", "spfSeverity", "spfSize", "spfTabIndex", "spfType"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpaWelcomeComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'spa-welcome',
                    template: `<div class="flex flex-col gap-3">
    <spn-button [spfFullWidth]="true" *ngFor="let channel of filteredChannels" (click)="onSelectChannel(channel)">
      {{ channel.brand }}
    </spn-button>
  </div>`,
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { channels: [{
                type: Input
            }], spaSelected: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhLXdlbGNvbWUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci1jb21wb25lbnRzL3NwYS1jaGFubmVsLXNlbGVjdGlvbi9zcmMvc3BhLXdlbGNvbWUuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDdkUsT0FBTyxFQUFrQixxQkFBcUIsRUFBRSxNQUFNLDhDQUE4QyxDQUFDOzs7O0FBVXJHLE1BQU0sT0FBTyxtQkFBbUI7SUFNOUI7UUFMZ0IsYUFBUSxHQUFzQixFQUFFLENBQUM7UUFDaEMsZ0JBQVcsR0FBaUMsSUFBSSxZQUFZLEVBQWtCLENBQUM7SUFLNUYsQ0FBQztJQUhMLElBQUksZ0JBQWdCLEtBQU0sT0FBTyxDQUFDLElBQUksQ0FBQyxRQUFRLElBQUksRUFBRSxDQUFDLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxRQUFRLENBQUMscUJBQXFCLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFLNUksZUFBZSxDQUFDLE9BQXVCO1FBQ3JDLElBQUksQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ2pDLENBQUM7O2dIQVhVLG1CQUFtQjtvR0FBbkIsbUJBQW1CLDhIQU5wQjs7OztTQUlIOzJGQUVJLG1CQUFtQjtrQkFSL0IsU0FBUzttQkFBQztvQkFDVCx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