import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { RadioGroupBaseComponent } from '@ironsource/fusion-ui/components/radio-group/common/base';
import * as i0 from "@angular/core";
import * as i1 from "@ironsource/fusion-ui/components/radio/v1";
import * as i2 from "@angular/common";
const _c0 = a0 => ({ inline: a0 });
function RadioGroupComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 1)(1, "fusion-radio", 2);
    i0.ɵɵlistener("changed", function RadioGroupComponent_div_1_Template_fusion_radio_changed_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.setSelected($event)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const option_r1 = ctx.$implicit;
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0, ctx_r0.inline));
    i0.ɵɵadvance();
    i0.ɵɵproperty("name", ctx_r0.name)("value", option_r1.id)("label", option_r1.label)("icon", option_r1.icon)("tooltip", option_r1.tooltip)("checked", ctx_r0.isSelected(option_r1))("isDisabled", ctx_r0.isDisabled || option_r1.disabled);
} }
export class RadioGroupComponent extends RadioGroupBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵRadioGroupComponent_BaseFactory; return function RadioGroupComponent_Factory(t) { return (ɵRadioGroupComponent_BaseFactory || (ɵRadioGroupComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RadioGroupComponent)))(t || RadioGroupComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RadioGroupComponent, selectors: [["fusion-radio-group"]], features: [i0.ɵɵProvidersFeature([
                {
                    provide: NG_VALUE_ACCESSOR,
                    useExisting: forwardRef(() => RadioGroupComponent),
                    multi: true
                }
            ]), i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "is-radio-holder", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "is-radio-holder", 3, "ngClass"], [3, "name", "value", "label", "icon", "tooltip", "checked", "isDisabled", "changed"]], template: function RadioGroupComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div");
            i0.ɵɵtemplate(1, RadioGroupComponent_div_1_Template, 2, 10, "div", 0);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵattribute("id", ctx.id);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngForOf", ctx.options);
        } }, dependencies: [i1.RadioComponent, i2.NgClass, i2.NgForOf], styles: ["fusion-radio-group{text-align:initial}fusion-radio-group+fusion-radio-group{margin-left:17px}fusion-radio-group .is-radio-holder{margin-bottom:8px}fusion-radio-group .is-radio-holder.inline{display:inline;margin-right:15px}fusion-radio-group .is-radio-holder.inline:last-child{margin-right:inherit}\n"], encapsulation: 2, changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RadioGroupComponent, [{
        type: Component,
        args: [{ selector: 'fusion-radio-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                    {
                        provide: NG_VALUE_ACCESSOR,
                        useExisting: forwardRef(() => RadioGroupComponent),
                        multi: true
                    }
                ], template: "<div [attr.id]=\"id\">\n    <div class=\"is-radio-holder\" *ngFor=\"let option of options\" [ngClass]=\"{inline: inline}\">\n        <fusion-radio\n            [name]=\"name\"\n            [value]=\"option.id\"\n            [label]=\"option.label\"\n            [icon]=\"option.icon\"\n            [tooltip]=\"option.tooltip\"\n            [checked]=\"isSelected(option)\"\n            [isDisabled]=\"isDisabled || option.disabled\"\n            (changed)=\"setSelected($event)\"\n        ></fusion-radio>\n    </div>\n</div>\n", styles: ["fusion-radio-group{text-align:initial}fusion-radio-group+fusion-radio-group{margin-left:17px}fusion-radio-group .is-radio-holder{margin-bottom:8px}fusion-radio-group .is-radio-holder.inline{display:inline;margin-right:15px}fusion-radio-group .is-radio-holder.inline:last-child{margin-right:inherit}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RadioGroupComponent, { className: "RadioGroupComponent", filePath: "radio-group.component.ts", lineNumber: 19 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8tZ3JvdXAuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZnVzaW9uLXVpL2NvbXBvbmVudHMvcmFkaW8tZ3JvdXAvdjEvcmFkaW8tZ3JvdXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZnVzaW9uLXVpL2NvbXBvbmVudHMvcmFkaW8tZ3JvdXAvY29tbW9uL2Jhc2UvcmFkaW8tZ3JvdXAuYmFzZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxpQkFBaUIsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNoRyxPQUFPLEVBQUMsaUJBQWlCLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUNqRCxPQUFPLEVBQUMsdUJBQXVCLEVBQUMsTUFBTSwwREFBMEQsQ0FBQzs7Ozs7OztJQ0Q3Riw4QkFBeUYsc0JBQUE7SUFTakYsZ0xBQVcsZUFBQSwwQkFBbUIsQ0FBQSxJQUFDO0lBQ2xDLGlCQUFlLEVBQUE7Ozs7SUFWd0MsbUVBQTRCO0lBRWhGLGNBQWE7SUFBYixrQ0FBYSx1QkFBQSwwQkFBQSx3QkFBQSw4QkFBQSx5Q0FBQSx1REFBQTs7QURlekIs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