import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
/**
 * val-horizontal-scroll
 *
 * A generic horizontal scroll container that renders items using a provided template.
 * Useful for carousels, galleries, or any horizontally scrollable content.
 *
 * @example
 * <val-horizontal-scroll
 *   [items]="cards"
 *   [itemTemplate]="cardTemplate"
 *   [props]="{ gap: '16px', snapAlign: 'start' }"
 * ></val-horizontal-scroll>
 *
 * <ng-template #cardTemplate let-item let-index="index">
 *   <div class="card">{{ item.title }}</div>
 * </ng-template>
 *
 * @input items - Array of items to render
 * @input itemTemplate - Template reference for rendering each item
 * @input props - Optional configuration (gap, padding, showScrollbar, snapAlign)
 */
export class HorizontalScrollComponent {
    constructor() {
        /**
         * Array of items to render in the horizontal scroll.
         */
        this.items = [];
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HorizontalScrollComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: HorizontalScrollComponent, isStandalone: true, selector: "val-horizontal-scroll", inputs: { items: "items", itemTemplate: "itemTemplate", props: "props" }, ngImport: i0, template: `
    <div
      class="horizontal-scroll-container"
      [class.hide-scrollbar]="!props?.showScrollbar"
      [class.snap-start]="props?.snapAlign === 'start'"
      [class.snap-center]="props?.snapAlign === 'center'"
      [style.padding]="props?.padding || '0px'"
    >
      <div class="items-wrapper" [style.gap]="props?.gap || '0px'">
        @for (item of items; track $index) {
          <div class="scroll-item">
            <ng-container
              *ngTemplateOutlet="itemTemplate; context: { $implicit: item, index: $index }"
            ></ng-container>
          </div>
        }
      </div>
    </div>
  `, isInline: true, styles: [".horizontal-scroll-container{overflow-x:scroll;-webkit-overflow-scrolling:touch;scroll-behavior:smooth}.horizontal-scroll-container.hide-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.horizontal-scroll-container.hide-scrollbar::-webkit-scrollbar{display:none}.horizontal-scroll-container.snap-start{scroll-snap-type:x mandatory}.horizontal-scroll-container.snap-start .scroll-item{scroll-snap-align:start}.horizontal-scroll-container.snap-center{scroll-snap-type:x mandatory}.horizontal-scroll-container.snap-center .scroll-item{scroll-snap-align:center}.horizontal-scroll-container .items-wrapper{display:flex;flex-wrap:nowrap}.horizontal-scroll-container .items-wrapper .scroll-item{flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HorizontalScrollComponent, decorators: [{
            type: Component,
            args: [{ selector: 'val-horizontal-scroll', standalone: true, imports: [CommonModule], template: `
    <div
      class="horizontal-scroll-container"
      [class.hide-scrollbar]="!props?.showScrollbar"
      [class.snap-start]="props?.snapAlign === 'start'"
      [class.snap-center]="props?.snapAlign === 'center'"
      [style.padding]="props?.padding || '0px'"
    >
      <div class="items-wrapper" [style.gap]="props?.gap || '0px'">
        @for (item of items; track $index) {
          <div class="scroll-item">
            <ng-container
              *ngTemplateOutlet="itemTemplate; context: { $implicit: item, index: $index }"
            ></ng-container>
          </div>
        }
      </div>
    </div>
  `, styles: [".horizontal-scroll-container{overflow-x:scroll;-webkit-overflow-scrolling:touch;scroll-behavior:smooth}.horizontal-scroll-container.hide-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.horizontal-scroll-container.hide-scrollbar::-webkit-scrollbar{display:none}.horizontal-scroll-container.snap-start{scroll-snap-type:x mandatory}.horizontal-scroll-container.snap-start .scroll-item{scroll-snap-align:start}.horizontal-scroll-container.snap-center{scroll-snap-type:x mandatory}.horizontal-scroll-container.snap-center .scroll-item{scroll-snap-align:center}.horizontal-scroll-container .items-wrapper{display:flex;flex-wrap:nowrap}.horizontal-scroll-container .items-wrapper .scroll-item{flex-shrink:0}\n"] }]
        }], propDecorators: { items: [{
                type: Input
            }], itemTemplate: [{
                type: Input
            }], props: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9yaXpvbnRhbC1zY3JvbGwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb21wb25lbnRzL2F0b21zL2hvcml6b250YWwtc2Nyb2xsL2hvcml6b250YWwtc2Nyb2xsLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQWUsTUFBTSxlQUFlLENBQUM7OztBQUc5RDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FvQkc7QUEwQkgsTUFBTSxPQUFPLHlCQUF5QjtJQXpCdEM7UUEwQkU7O1dBRUc7UUFDTSxVQUFLLEdBQVEsRUFBRSxDQUFDO0tBWTFCOytHQWhCWSx5QkFBeUI7bUdBQXpCLHlCQUF5QiwySkFyQjFCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FrQlQsK3dCQW5CUyxZQUFZOzs0RkFzQlgseUJBQXlCO2tCQXpCckMsU0FBUzsrQkFDRSx1QkFBdUIsY0FDckIsSUFBSSxXQUNQLENBQUMsWUFBWSxDQUFDLFlBQ2I7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQWtCVDs4QkFPUSxLQUFLO3NCQUFiLEtBQUs7Z0JBTUcsWUFBWTtzQkFBcEIsS0FBSztnQkFLRyxLQUFLO3NCQUFiLEtBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW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