import { ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { RadioBaseComponent } from '@ironsource/fusion-ui/components/radio/common/base';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/icon/v1";
import * as i3 from "@ironsource/fusion-ui/components/tooltip/v1";
function RadioComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "label", 5);
    i0.ɵɵelement(1, "span");
    i0.ɵɵelementContainer(2, 4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    const fusionIconRef_r3 = i0.ɵɵreference(7);
    i0.ɵɵproperty("for", ctx_r1.genElementId());
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngTemplateOutlet", fusionIconRef_r3);
} }
function RadioComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "label", 6);
    i0.ɵɵelement(1, "span");
    i0.ɵɵelementContainer(2, 4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    const fusionIconRef_r3 = i0.ɵɵreference(7);
    i0.ɵɵproperty("fusionTooltip", ctx_r1.tooltip)("for", ctx_r1.genElementId());
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngTemplateOutlet", fusionIconRef_r3);
} }
function RadioComponent_ng_template_6_fusion_icon_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 8);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("name", ctx_r1.icon);
} }
function RadioComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, RadioComponent_ng_template_6_fusion_icon_0_Template, 1, 1, "fusion-icon", 7);
    i0.ɵɵtext(1);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r1.icon);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r1.label, "\n");
} }
export class RadioComponent extends RadioBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵRadioComponent_BaseFactory; return function RadioComponent_Factory(__ngFactoryType__) { return (ɵRadioComponent_BaseFactory || (ɵRadioComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RadioComponent)))(__ngFactoryType__ || RadioComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RadioComponent, selectors: [["fusion-radio"]], features: [i0.ɵɵProvidersFeature([
                {
                    provide: NG_VALUE_ACCESSOR,
                    useExisting: forwardRef(() => RadioComponent),
                    multi: true
                }
            ]), i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 6, consts: [["defaultRef", ""], ["tooltipRef", ""], ["fusionIconRef", ""], ["type", "radio", 3, "change", "checked", "id", "name", "value", "disabled"], [3, "ngTemplateOutlet"], [3, "for"], [1, "truncate", 3, "fusionTooltip", "for"], ["class", "fu-radio-icon", 3, "name", 4, "ngIf"], [1, "fu-radio-icon", 3, "name"]], template: function RadioComponent_Template(rf, ctx) { if (rf & 1) {
            const _r1 = i0.ɵɵgetCurrentView();
            i0.ɵɵelementStart(0, "input", 3);
            i0.ɵɵlistener("change", function RadioComponent_Template_input_change_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onChanged()); });
            i0.ɵɵelementEnd();
            i0.ɵɵelementContainer(1, 4);
            i0.ɵɵtemplate(2, RadioComponent_ng_template_2_Template, 3, 2, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(4, RadioComponent_ng_template_4_Template, 3, 3, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(6, RadioComponent_ng_template_6_Template, 2, 2, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            const defaultRef_r4 = i0.ɵɵreference(3);
            const tooltipRef_r5 = i0.ɵɵreference(5);
            i0.ɵɵproperty("checked", ctx.checked)("id", ctx.genElementId())("name", ctx.name)("value", ctx.value)("disabled", ctx.isDisabled);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngTemplateOutlet", !!ctx.tooltip ? tooltipRef_r5 : defaultRef_r4);
        } }, dependencies: [i1.NgIf, i1.NgTemplateOutlet, i2.IconComponent, i3.TooltipDirective], styles: ["[_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}[_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{color:var(--fu-dark-300, #313d91);-webkit-user-select:none;user-select:none;cursor:pointer}[_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%] + label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:inline-block;width:14px;height:14px;margin:-2px 4px 0 0;vertical-align:middle;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6' fill='%23FFF' fill-rule='evenodd' stroke='%23A9AFB4' stroke-width='2'/%3E%3C/svg%3E\") left top no-repeat;cursor:pointer}[_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(-1 -1)'%3E%3Ccircle cx='8' cy='8' r='7' fill='%233083FF'/%3E%3Ccircle cx='8' cy='8' r='2' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E\") left top no-repeat}[_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]{color:var(--fu-light-900, #7b838c);cursor:default}[_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%23D2D5D8' stroke-width='2' transform='translate(-1 -1)'/%3E%3C/svg%3E\") left top no-repeat;cursor:default}[_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]:disabled:checked + label[_ngcontent-%COMP%]{cursor:default}[_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]:disabled:checked + label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(-1 -1)'%3E%3Ccircle cx='8' cy='8' r='7' fill='%23B7BBC0'/%3E%3Ccircle cx='8' cy='8' r='2' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E\") left top no-repeat;cursor:default}[_nghost-%COMP%]   label[_ngcontent-%COMP%]   fusion-icon.fu-radio-icon[_ngcontent-%COMP%]{padding:0 4px;vertical-align:sub}[_nghost-%COMP%]   label[_ngcontent-%COMP%]   fusion-icon.fu-radio-icon[_ngcontent-%COMP%]     svg{width:14px;height:14px}[_nghost-%COMP%]   label[_ngcontent-%COMP%]   fusion-icon.fu-radio-icon[_ngcontent-%COMP%]     svg *{fill:var(--fu-light-900, #7b838c)}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RadioComponent, [{
        type: Component,
        args: [{ selector: 'fusion-radio', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                    {
                        provide: NG_VALUE_ACCESSOR,
                        useExisting: forwardRef(() => RadioComponent),
                        multi: true
                    }
                ], template: "<input type=\"radio\"\n       [checked]=\"checked\"\n       [id]=\"genElementId()\"\n       [name]=\"name\"\n       [value]=\"value\"\n       [disabled]=\"isDisabled\"\n       (change)=\"onChanged()\"\n>\n<ng-container [ngTemplateOutlet]=\"!!tooltip ? tooltipRef : defaultRef\"></ng-container>\n\n\n<ng-template #defaultRef>\n  <label [for]=\"genElementId()\"><span></span>\n    <ng-container [ngTemplateOutlet]=\"fusionIconRef\"></ng-container>\n  </label>\n</ng-template>\n\n<ng-template #tooltipRef>\n  <label [fusionTooltip]=\"tooltip\" class=\"truncate\" [for]=\"genElementId()\"><span></span>\n    <ng-container [ngTemplateOutlet]=\"fusionIconRef\"></ng-container>\n  </label>\n</ng-template>\n\n<ng-template #fusionIconRef>\n  <fusion-icon class=\"fu-radio-icon\" *ngIf=\"icon\" [name]=\"icon\"></fusion-icon>\n    {{label}}\n</ng-template>\n", styles: [":host input[type=radio]+label{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}:host input[type=radio]{display:none}:host input[type=radio]+label{color:var(--fu-dark-300, #313d91);-webkit-user-select:none;user-select:none;cursor:pointer}:host input[type=radio]+label span{display:inline-block;width:14px;height:14px;margin:-2px 4px 0 0;vertical-align:middle;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6' fill='%23FFF' fill-rule='evenodd' stroke='%23A9AFB4' stroke-width='2'/%3E%3C/svg%3E\") left top no-repeat;cursor:pointer}:host input[type=radio]:checked+label span{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(-1 -1)'%3E%3Ccircle cx='8' cy='8' r='7' fill='%233083FF'/%3E%3Ccircle cx='8' cy='8' r='2' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E\") left top no-repeat}:host input[type=radio]:disabled+label{color:var(--fu-light-900, #7b838c);cursor:default}:host input[type=radio]:disabled+label span{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%23D2D5D8' stroke-width='2' transform='translate(-1 -1)'/%3E%3C/svg%3E\") left top no-repeat;cursor:default}:host input[type=radio]:disabled:checked+label{cursor:default}:host input[type=radio]:disabled:checked+label span{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(-1 -1)'%3E%3Ccircle cx='8' cy='8' r='7' fill='%23B7BBC0'/%3E%3Ccircle cx='8' cy='8' r='2' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E\") left top no-repeat;cursor:default}:host label fusion-icon.fu-radio-icon{padding:0 4px;vertical-align:sub}:host label fusion-icon.fu-radio-icon ::ng-deep svg{width:14px;height:14px}:host label fusion-icon.fu-radio-icon ::ng-deep svg *{fill:var(--fu-light-900, #7b838c)}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RadioComponent, { className: "RadioComponent", filePath: "radio.component.ts", lineNumber: 18 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZnVzaW9uLXVpL2NvbXBvbmVudHMvcmFkaW8vdjIvcmFkaW8uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZnVzaW9uLXVpL2NvbXBvbmVudHMvcmFkaW8vY29tbW9uL2Jhc2UvcmFkaW8uYmFzZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFVBQV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