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/v2";
import * as i2 from "@angular/common";
const _c0 = a0 => ({ inline: a0 });
function RadioGroupComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r1 = 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(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setSelected($event)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const option_r3 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0, ctx_r1.inline));
    i0.ɵɵadvance();
    i0.ɵɵproperty("name", ctx_r1.name)("value", option_r3.id)("label", option_r3.label)("icon", option_r3.icon)("tooltip", option_r3.tooltip)("checked", ctx_r1.isSelected(option_r3))("isDisabled", ctx_r1.isDisabled || option_r3.disabled);
} }
export class RadioGroupComponent extends RadioGroupBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵRadioGroupComponent_BaseFactory; return function RadioGroupComponent_Factory(__ngFactoryType__) { return (ɵRadioGroupComponent_BaseFactory || (ɵRadioGroupComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RadioGroupComponent)))(__ngFactoryType__ || 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, "changed", "name", "value", "label", "icon", "tooltip", "checked", "isDisabled"]], 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8tZ3JvdXAuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZnVzaW9uLXVpL2NvbXBvbmVudHMvcmFkaW8tZ3JvdXAvdjIvcmFkaW8tZ3JvdXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZnVzaW9uLXVpL2NvbXBvbmVudHMvcmFkaW8tZ3JvdXAvY29tbW9uL2Jhc2UvcmFkaW8tZ3JvdXAuYmFzZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxpQkFBaUIsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNoRyxPQUFPLEVBQUMsaUJBQWlCLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUNqRCxPQUFPLEVBQUMsdUJBQXVCLEVBQUMsTUFBTSwwREFBMEQsQ0FBQzs7Ozs7OztJQ0F6RixBQURKLDhCQUF5RixzQkFVcEY7SUFERywrTEFBVywwQkFBbUIsS0FBQztJQUV2QyxBQURLLGlCQUFlLEVBQ2Q7Ozs7SUFYc0QsbUVBQTRCO0lBRWhGLGNBQWE7SUFNYixBQURBLEFBREEsQUFEQSxBQURBLEFBREEsQUFEQSxrQ0FBYSx1QkFDTSwwQk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