import { Input, Directive } from '@angular/core'; import * as i0 from "@angular/core"; let nextId = 0; class CarouselSlideDirective { tplRef; /** * Unique slide identifier. Must be unique for the entire document for proper accessibility support. * Will be auto-generated if not provided. */ id = `owl-slide-${nextId++}`; /** * Defines how much widths of common slide will current slide have * e.g. if _mergeData=2, the slide will twice wider then slides with _mergeData=1 */ _dataMerge = 1; set dataMerge(data) { this._dataMerge = this.isNumeric(data) ? data : 1; } ; get dataMerge() { return this._dataMerge; } /** * Width of slide */ width = 0; /** * Inner content of dot for certain slide; can be html-markup */ dotContent = ''; /** * Hash (fragment) of url which corresponds to certain slide */ dataHash = ''; constructor(tplRef) { this.tplRef = tplRef; } /** * Determines if the input is a Number or something that can be coerced to a Number * @param - The input to be tested * @returns - An indication if the input is a Number or can be coerced to a Number */ isNumeric(number) { return !isNaN(parseFloat(number)); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: CarouselSlideDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: CarouselSlideDirective, selector: "ng-template[carouselSlide]", inputs: { id: "id", dataMerge: "dataMerge", width: "width", dotContent: "dotContent", dataHash: "dataHash" }, ngImport: i0 }); } export { CarouselSlideDirective }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: CarouselSlideDirective, decorators: [{ type: Directive, args: [{ selector: 'ng-template[carouselSlide]' }] }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { id: [{ type: Input }], dataMerge: [{ type: Input }], width: [{ type: Input }], dotContent: [{ type: Input }], dataHash: [{ type: Input }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Fyb3VzZWwtc2xpZGUuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOl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