import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@seniorsistemas/angular-components/star-rating";
import * as i3 from "../../../components/field-label/field-label.component";
export class StarRatingFieldComponent {
    field;
    formControl;
    onValueChange(newValue) {
        if (this.field.valueChange) {
            this.field.valueChange(newValue);
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StarRatingFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StarRatingFieldComponent, selector: "s-star-rating-field", inputs: { field: "field", formControl: "formControl" }, ngImport: i0, template: "<s-field-label [field]=\"field\"/>\n\n<s-star-rating [justifyContent]=\"field.justifyContent\" [formControl]=\"formControl\" (selectedStarChange)=\"onValueChange($event)\">\n", dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.StarRatingComponent, selector: "s-star-rating", inputs: ["selectedStar", "starsRange", "justifyContent", "disabled"], outputs: ["selectedStarChange", "disabledChange"] }, { kind: "component", type: i3.FieldLabelComponent, selector: "s-field-label", inputs: ["field", "fieldContainerRef"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StarRatingFieldComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-star-rating-field', template: "<s-field-label [field]=\"field\"/>\n\n<s-star-rating [justifyContent]=\"field.justifyContent\" [formControl]=\"formControl\" (selectedStarChange)=\"onValueChange($event)\">\n" }]
        }], propDecorators: { field: [{
                type: Input
            }], formControl: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Rhci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