import { r as registerInstance, h, c as createEvent, g as getElement } from './index-148a7577.js';
import { C as CodeBlockVariation, B as ButtonSize } from './code-example-variation.enum-e656d235.js';
import { b as CodeBlockLanguage, h as FormRadiobuttonVariation, f as FormRadiobuttonLayout, g as FormRadiobuttonValidation } from './typography-variation.enum-531cdf64.js';
import { P as Prism } from './prism-git-92a0d5cd.js';
import './badge-notification-shape.enum-e15a6245.js';
import './badge-status-variation.enum-8d6370ff.js';
import './form-input-search-variation.enum-6d8dc10a.js';
import { B as ButtonVariation } from './button-variation.enum-94fffdd6.js';
import './calendar-week-view-heading-level.enum-6774297c.js';
import './code-variation.enum-1eee7c7a.js';
import './expandable-accordion-header-level.enum-85681e2f.js';
import './expandable-faq-item-variation.enum-a8cb225b.js';
import './expandable-faq-variation.enum-6934c367.js';
import './footer-card-variation.enum-cc732148.js';
import './form-checkbox-variation.enum-83e906fc.js';
import './form-file-upload-variation.enum-9c49ec5e.js';
import './form-input-type.enum-3da3db27.js';
import './form-input-variation.enum-64d9450f.js';
import './form-select-variation.enum-f2f6098d.js';
import './form-textarea-variation.enum-05017e8e.js';
import './form-validation-message-variation.enum-bcef8a9d.js';
import './info-card-multi-type.enum-07ee124f.js';
import './info-card-variation.enum-2ccc52c1.js';
import './layout-block-variation.enum-b7a20db4.js';
import './layout-columns-variation.enum-34f7754e.js';
import './link-button-variation.enum-84d4976f.js';
import './list-type.enum-fbb331ad.js';
import './loader-skeleton-variation.enum-f9f867b4.js';
import './loader-spinner-size.enum-0b246fa0.js';
import './logo-variation.enum-5b68b79f.js';
import './media-figure-alignment.enum-a1d36567.js';
import './navigation-sidebar-variation.enum-8fead764.js';
import './progress-indicator-variation.enum-b12ba50a.js';
import './progress-list-item-variation.enum-384b9a3a.js';
import './progress-list-variation.enum-300bd89d.js';
import './progressbar-variation.enum-40adaab4.js';
import './quote-image-inner-position.enum-8e9b1e65.js';
import './table-variation.enum-dd9366b6.js';
import './tag-media-icon.enum-fefa191c.js';
import './tag-size.enum-403e0cd8.js';
import './tools-feedback-banner-type.enum-74b4e580.js';
import './tools-feedback-rating-variation.enum-29058ff2.js';
import './tools-theme-provider.brand.enum-8c5a98c9.js';
import './typography-heading-jumbo-variation.enum-eb737f1b.js';
import './typography-meta-variation.enum-1f7c2878.js';
import './typography-time-variation.enum-34c830ef.js';
import './util-breakpoint-observer-breakpoints.enum-6d004731.js';
import { _ as _t } from './text-26e02c8d.js';
import { r as randomIdGenerator } from './randomIdGenerator.util-56406f2e.js';

const codeBlockCss = "digi-code-block{--digi--code-block--background:var(--digi--color--background--primary);--digi--code-block--border-radius:0.3rem;--digi--code-block--border:1px solid var(--digi--grayscale--900);display:block}digi-code-block .digi-code-block{border-radius:var(--digi--code-block--border-radius);border:var(--digi--code-block--border);overflow:hidden;position:relative}digi-code-block .digi-code-block pre{margin:0}digi-code-block .digi-code-block--light{}digi-code-block .digi-code-block--light code[class*=language-],digi-code-block .digi-code-block--light pre[class*=language-]{color:#545454;background:none;font-family:var(--digi--global--typography--font-family--mono);text-align:left;white-space:pre-wrap;word-spacing:normal;word-break:break-word;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}digi-code-block .digi-code-block--light pre[class*=language-]{padding:1em;overflow:auto}digi-code-block .digi-code-block--light :not(pre)>code[class*=language-],digi-code-block .digi-code-block--light pre[class*=language-]{background:#fefefe}digi-code-block .digi-code-block--light :not(pre)>code[class*=language-]{padding:0.1em;white-space:normal}digi-code-block .digi-code-block--light .token.comment,digi-code-block .digi-code-block--light .token.prolog,digi-code-block .digi-code-block--light .token.doctype,digi-code-block .digi-code-block--light .token.cdata{color:#696969}digi-code-block .digi-code-block--light .token.punctuation{color:#545454}digi-code-block .digi-code-block--light .token.property,digi-code-block .digi-code-block--light .token.tag,digi-code-block .digi-code-block--light .token.constant,digi-code-block .digi-code-block--light .token.symbol,digi-code-block .digi-code-block--light .token.deleted{color:#007faa}digi-code-block .digi-code-block--light .token.boolean,digi-code-block .digi-code-block--light .token.number{color:#008000}digi-code-block .digi-code-block--light .token.selector,digi-code-block .digi-code-block--light .token.attr-name,digi-code-block .digi-code-block--light .token.string,digi-code-block .digi-code-block--light .token.char,digi-code-block .digi-code-block--light .token.builtin,digi-code-block .digi-code-block--light .token.inserted{color:#aa5d00}digi-code-block .digi-code-block--light .token.operator,digi-code-block .digi-code-block--light .token.entity,digi-code-block .digi-code-block--light .token.url,digi-code-block .digi-code-block--light .language-css .token.string,digi-code-block .digi-code-block--light .style .token.string,digi-code-block .digi-code-block--light .token.variable{color:#008000}digi-code-block .digi-code-block--light .token.atrule,digi-code-block .digi-code-block--light .token.attr-value,digi-code-block .digi-code-block--light .token.function{color:#aa5d00}digi-code-block .digi-code-block--light .token.keyword{color:#d91e18}digi-code-block .digi-code-block--light .token.regex,digi-code-block .digi-code-block--light .token.important{color:#d91e18}digi-code-block .digi-code-block--light .token.important,digi-code-block .digi-code-block--light .token.bold{font-weight:bold}digi-code-block .digi-code-block--light .token.italic{font-style:italic}digi-code-block .digi-code-block--light .token.entity{cursor:help}@media screen and (-ms-high-contrast: active){digi-code-block .digi-code-block--light code[class*=language-],digi-code-block .digi-code-block--light pre[class*=language-]{color:windowText;background:window}digi-code-block .digi-code-block--light :not(pre)>code[class*=language-],digi-code-block .digi-code-block--light pre[class*=language-]{background:window}digi-code-block .digi-code-block--light .token.important{background:highlight;color:window;font-weight:normal}digi-code-block .digi-code-block--light .token.atrule,digi-code-block .digi-code-block--light .token.attr-value,digi-code-block .digi-code-block--light .token.function,digi-code-block .digi-code-block--light .token.keyword,digi-code-block .digi-code-block--light .token.operator,digi-code-block .digi-code-block--light .token.selector{font-weight:bold}digi-code-block .digi-code-block--light .token.attr-value,digi-code-block .digi-code-block--light .token.comment,digi-code-block .digi-code-block--light .token.doctype,digi-code-block .digi-code-block--light .token.function,digi-code-block .digi-code-block--light .token.keyword,digi-code-block .digi-code-block--light .token.operator,digi-code-block .digi-code-block--light .token.property,digi-code-block .digi-code-block--light .token.string{color:highlight}digi-code-block .digi-code-block--light .token.attr-value,digi-code-block .digi-code-block--light .token.url{font-weight:normal}}digi-code-block .digi-code-block--dark{}digi-code-block .digi-code-block--dark .digi-code-block__button{--digi--button--color--text--function--default:var(--digi--color--text--secondary);--digi--button--color--text--function--hover:var(--digi--color--text--secondary);--digi--button--color--icon--function--default:var(--digi--color--text--secondary);--digi--button--color--icon--function--hover:var(--digi--color--text--secondary);--digi--button--color--text--function--focus:var(--digi--color--text--secondary);--digi--button--color--icon--function--focus:var(--digi--color--text--secondary)}digi-code-block .digi-code-block--dark code[class*=language-],digi-code-block .digi-code-block--dark pre[class*=language-]{color:#f8f8f2;background:none;font-family:var(--digi--global--typography--font-family--mono);text-align:left;white-space:pre-wrap;word-spacing:normal;word-break:break-word;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}digi-code-block .digi-code-block--dark pre[class*=language-]{padding:1em;overflow:auto}digi-code-block .digi-code-block--dark :not(pre)>code[class*=language-],digi-code-block .digi-code-block--dark pre[class*=language-]{background:#272727}digi-code-block .digi-code-block--dark :not(pre)>code[class*=language-]{padding:0.1em;white-space:normal}digi-code-block .digi-code-block--dark .token.comment,digi-code-block .digi-code-block--dark .token.prolog,digi-code-block .digi-code-block--dark .token.doctype,digi-code-block .digi-code-block--dark .token.cdata{color:#d4d0ab}digi-code-block .digi-code-block--dark .token.punctuation{color:#fefefe}digi-code-block .digi-code-block--dark .token.property,digi-code-block .digi-code-block--dark .token.tag,digi-code-block .digi-code-block--dark .token.constant,digi-code-block .digi-code-block--dark .token.symbol,digi-code-block .digi-code-block--dark .token.deleted{color:#ffa07a}digi-code-block .digi-code-block--dark .token.boolean,digi-code-block .digi-code-block--dark .token.number{color:#00e0e0}digi-code-block .digi-code-block--dark .token.selector,digi-code-block .digi-code-block--dark .token.attr-name,digi-code-block .digi-code-block--dark .token.string,digi-code-block .digi-code-block--dark .token.char,digi-code-block .digi-code-block--dark .token.builtin,digi-code-block .digi-code-block--dark .token.inserted{color:#abe338}digi-code-block .digi-code-block--dark .token.operator,digi-code-block .digi-code-block--dark .token.entity,digi-code-block .digi-code-block--dark .token.url,digi-code-block .digi-code-block--dark .language-css .token.string,digi-code-block .digi-code-block--dark .style .token.string,digi-code-block .digi-code-block--dark .token.variable{color:#00e0e0}digi-code-block .digi-code-block--dark .token.atrule,digi-code-block .digi-code-block--dark .token.attr-value,digi-code-block .digi-code-block--dark .token.function{color:#ffd700}digi-code-block .digi-code-block--dark .token.keyword{color:#00e0e0}digi-code-block .digi-code-block--dark .token.regex,digi-code-block .digi-code-block--dark .token.important{color:#ffd700}digi-code-block .digi-code-block--dark .token.important,digi-code-block .digi-code-block--dark .token.bold{font-weight:bold}digi-code-block .digi-code-block--dark .token.italic{font-style:italic}digi-code-block .digi-code-block--dark .token.entity{cursor:help}@media screen and (-ms-high-contrast: active){digi-code-block .digi-code-block--dark code[class*=language-],digi-code-block .digi-code-block--dark pre[class*=language-]{color:windowText;background:window}digi-code-block .digi-code-block--dark :not(pre)>code[class*=language-],digi-code-block .digi-code-block--dark pre[class*=language-]{background:window}digi-code-block .digi-code-block--dark .token.important{background:highlight;color:window;font-weight:normal}digi-code-block .digi-code-block--dark .token.atrule,digi-code-block .digi-code-block--dark .token.attr-value,digi-code-block .digi-code-block--dark .token.function,digi-code-block .digi-code-block--dark .token.keyword,digi-code-block .digi-code-block--dark .token.operator,digi-code-block .digi-code-block--dark .token.selector{font-weight:bold}digi-code-block .digi-code-block--dark .token.attr-value,digi-code-block .digi-code-block--dark .token.comment,digi-code-block .digi-code-block--dark .token.doctype,digi-code-block .digi-code-block--dark .token.function,digi-code-block .digi-code-block--dark .token.keyword,digi-code-block .digi-code-block--dark .token.operator,digi-code-block .digi-code-block--dark .token.property,digi-code-block .digi-code-block--dark .token.string{color:highlight}digi-code-block .digi-code-block--dark .token.attr-value,digi-code-block .digi-code-block--dark .token.url{font-weight:normal}}digi-code-block .digi-code-block__toolbar{padding-bottom:0.5rem;display:flex;justify-content:flex-end;position:absolute;bottom:0;width:100%}digi-code-block .digi-code-block__button{margin-right:var(--digi--margin--smaller)}";
const DigiCodeBlockStyle0 = codeBlockCss;

const CodeBlock = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.highlightedCode = undefined;
        this.afCode = undefined;
        this.afVariation = CodeBlockVariation.DARK;
        this.afLanguage = CodeBlockLanguage.HTML;
        this.afLang = 'en';
        this.afHideToolbar = false;
    }
    componentWillLoad() {
        Prism.manual = true;
        this.formatCode();
    }
    formatCode() {
        this.highlightedCode = Prism.highlight(this.afCode, Prism.languages[this.afLanguage], this.afLanguage);
    }
    copyButtonClickHandler() {
        navigator.clipboard.writeText(this.afCode).then(() => {
            // console.log('hurra!');
        }, (err) => {
            // console.log('åh nej!', err);
            console.error(err);
        });
    }
    get cssModifiers() {
        return {
            'digi-code-block--light': this.afVariation === CodeBlockVariation.LIGHT,
            'digi-code-block--dark': this.afVariation === CodeBlockVariation.DARK
        };
    }
    render() {
        return (h("div", { key: 'd4a2f69a550c83923cc29345e6d0015be77918ea', class: Object.assign({ 'digi-code-block': true }, this.cssModifiers) }, h("pre", { key: 'd7912db4bdb868018b26e59c7bbae4244b28236a', class: `digi-code-block__pre language-${this.afLanguage}` }, h("code", { key: '484b111ec3fd7893d185633c377a9b6d4f8d3d52', class: "digi-code-block__code", lang: this.afLang, innerHTML: this.highlightedCode })), !this.afHideToolbar && (h("div", { key: '95f25d6e32161ba02268abf67040930ba5c5abd4', class: "digi-code-block__toolbar" }, h("digi-button", { key: 'fc454e58b3061884951c6d20541eb16cc6d566d0', class: "digi-code-block__button", onAfOnClick: () => this.copyButtonClickHandler(), afVariation: ButtonVariation.FUNCTION, afSize: ButtonSize.SMALL }, h("digi-icon-copy", { key: 'b8ea39049f5da02449760433b09651273b14a9d9', class: "digi-code-block__icon", "aria-hidden": "true", slot: "icon" }), _t.code.copy)))));
    }
    static get watchers() { return {
        "afCode": ["formatCode"]
    }; }
};
CodeBlock.style = DigiCodeBlockStyle0;

const formFieldsetCss = ".sc-digi-form-fieldset-h{--digi--form-fieldset--padding:0;--digi--form-fieldset--border:none;--digi--form-fieldset--legend--font-weight:var(--digi--typography--description--font-weight--desktop);--digi--form-fieldset--legend--font-family:var(--digi--global--typography--font-family--default);--digi--form-fieldset--legend--font-size:var(--digi--typography--description--font-size--desktop);--digi--form-fieldset--legend--color:var(--digi--color--text--primary);--digi--form-fieldset--legend--margin:var(--digi--margin--h2-large)}.sc-digi-form-fieldset-h .digi-form-fieldset.sc-digi-form-fieldset{margin:0px;padding:var(--digi--form-fieldset--padding);border:var(--digi--form-fieldset--border)}.sc-digi-form-fieldset-h .digi-form-fieldset__legend.sc-digi-form-fieldset{font-weight:var(--digi--form-fieldset--legend--font-weight);font-family:var(--digi--form-fieldset--legend--font-family);font-size:var(--digi--form-fieldset--legend--font-size);color:var(--digi--form-fieldset--legend--color);margin-block-end:var(--digi--form-fieldset--legend--margin);padding:0px}";
const DigiFormFieldsetStyle0 = formFieldsetCss;

const FormFieldset = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.afLegend = undefined;
        this.afName = undefined;
        this.afForm = undefined;
        this.afId = randomIdGenerator('digi-form-fieldset');
    }
    render() {
        return (h("fieldset", { key: 'a7a58d88cd63c80e2ea6a1dabb87e047e9c00b2c', class: "digi-form-fieldset", name: this.afName, form: this.afForm, id: this.afId }, this.afLegend && (h("legend", { key: 'a6042cfa25c5fd53fd7efd27de0a041ba36eb24b', class: "digi-form-fieldset__legend" }, this.afLegend)), h("slot", { key: '0c301feeafa741c6ec844d3b55cb1ef487f74c3b' })));
    }
};
FormFieldset.style = DigiFormFieldsetStyle0;

const formRadiobuttonCss = ".sc-digi-form-radiobutton-h{--digi--form-radiobutton--border-color:var(--digi--color--border--interactive--default--on-input);--digi--form-radiobutton--border-color--primary:var(--digi--color--border--interactive--selected--primary);--digi--form-radiobutton--border-color--secondary:var(--digi--color--border--interactive--selected--secondary);--digi--form-radiobutton--border-color--error:var(--digi--color--border--interactive--validation--error);--digi--form-radiobutton--box-shadow--error:var(--digi--color--border--interactive--validation--error);--digi--form-radiobutton--background-color:var(--digi--color--background--interactive--default--input-elements);--digi--form-radiobutton--background-color--primary:var(--digi--color--background--interactive--selected--primary);--digi--form-radiobutton--background-color--secondary:var(--digi--color--background--interactive--selected--secondary);--digi--form-radiobutton--background-color--error:var(--digi--color--background--interactive--validation--error);--digi--form-radiobutton--border-width:var(--digi--border-width--primary);--digi--form-radiobutton--color--marker:var(--digi--grayscale--0);--digi--form-radiobutton--size:1.25rem;--digi--form-radiobutton--marker--size:calc(var(--digi--typography--input--font-size--desktop-large) * 0.4);--digi--form-radiobutton--height:var(--digi--input-height--large);--digi--form-radiobutton--border-radius:var(--digi--border-radius--primary);--digi--form-radiobutton--padding:var(--digi--gutter--icon);--digi--form-radiobutton--padding--block:var(--digi--gutter--small);--digi--form-radiobutton--padding--inline:var(--digi--gutter--icon)}.sc-digi-form-radiobutton-h .digi-form-radiobutton.sc-digi-form-radiobutton{--BACKGROUND--DEFAULT:var(--digi--form-radiobutton--background-color);--BORDER-COLOR--DEFAULT:var(--digi--form-radiobutton--border-color);position:relative}.sc-digi-form-radiobutton-h .digi-form-radiobutton--primary.sc-digi-form-radiobutton{--BACKGROUND--CHECKED:var(--digi--form-radiobutton--background-color--primary);--BORDER-COLOR--CHECKED:var(--digi--form-radiobutton--border-color--primary)}.sc-digi-form-radiobutton-h .digi-form-radiobutton--secondary.sc-digi-form-radiobutton{--BACKGROUND--CHECKED:var(--digi--form-radiobutton--background-color--secondary);--BORDER-COLOR--CHECKED:var(--digi--form-radiobutton--border-color--secondary)}.sc-digi-form-radiobutton-h .digi-form-radiobutton--error.sc-digi-form-radiobutton .digi-form-radiobutton__input.sc-digi-form-radiobutton:not(:checked)~.digi-form-radiobutton__label.sc-digi-form-radiobutton .digi-form-radiobutton__circle.sc-digi-form-radiobutton{--BACKGROUND--CHECKED:var(--digi--form-radiobutton--background-color--error);--BORDER-COLOR--CHECKED:var(--digi--form-radiobutton--border-color--error)}.sc-digi-form-radiobutton-h .digi-form-radiobutton--error.sc-digi-form-radiobutton .digi-form-radiobutton__input.sc-digi-form-radiobutton~.digi-form-radiobutton__label.sc-digi-form-radiobutton .digi-form-radiobutton__circle.sc-digi-form-radiobutton{background-color:var(--BACKGROUND--CHECKED);border-color:var(--BORDER-COLOR--CHECKED);box-shadow:0 0 0 var(--digi--border-width--primary) var(--digi--form-radiobutton--box-shadow--error)}.digi-form-radiobutton__input.sc-digi-form-radiobutton{position:absolute;opacity:0;cursor:pointer;height:0;width:0;top:0;left:0}.digi-form-radiobutton__label.sc-digi-form-radiobutton{display:inline-flex;align-items:center;gap:var(--digi--gutter--icon);font-family:var(--digi--global--typography--font-family--default);font-size:var(--digi--typography--body--font-size--desktop);color:var(--digi--color--text--primary);font-weight:var(--digi--typography--body--font-weight--desktop);cursor:pointer;margin-bottom:0.75rem}.digi-form-radiobutton__circle.sc-digi-form-radiobutton{flex-shrink:0;align-self:flex-start;cursor:pointer;background-color:var(--BACKGROUND--DEFAULT);border-color:var(--BORDER-COLOR--DEFAULT);border-width:var(--digi--form-radiobutton--border-width);border-style:solid;height:var(--digi--form-radiobutton--size);width:var(--digi--form-radiobutton--size);border-radius:var(--digi--form-radiobutton--size);position:relative;transform:translateY(1px)}.digi-form-radiobutton__input.sc-digi-form-radiobutton:focus-visible~.digi-form-radiobutton__label.sc-digi-form-radiobutton .digi-form-radiobutton__circle.sc-digi-form-radiobutton{outline:2px solid black;outline-offset:2px;box-shadow:0px 0px 0px 5px white}.digi-form-radiobutton__input.sc-digi-form-radiobutton:checked~.digi-form-radiobutton__label.sc-digi-form-radiobutton .digi-form-radiobutton__circle.sc-digi-form-radiobutton{background-color:var(--BACKGROUND--CHECKED);border-color:var(--BORDER-COLOR--CHECKED)}.digi-form-radiobutton__input.sc-digi-form-radiobutton:checked~.digi-form-radiobutton__label.sc-digi-form-radiobutton .digi-form-radiobutton__circle.sc-digi-form-radiobutton::after{content:\"\";width:var(--digi--form-radiobutton--marker--size);height:var(--digi--form-radiobutton--marker--size);border-radius:var(--digi--form-radiobutton--marker--size);background:var(--digi--form-radiobutton--color--marker);position:absolute;left:calc(50% - var(--digi--form-radiobutton--marker--size) / 2);top:calc(50% - var(--digi--form-radiobutton--marker--size) / 2)}";
const DigiFormRadiobuttonStyle0 = formRadiobuttonCss;

const FormRadiobutton = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.afOnChange = createEvent(this, "afOnChange", 7);
        this.afOnBlur = createEvent(this, "afOnBlur", 7);
        this.afOnFocus = createEvent(this, "afOnFocus", 7);
        this.afOnFocusout = createEvent(this, "afOnFocusout", 7);
        this.afOnInput = createEvent(this, "afOnInput", 7);
        this.afOnDirty = createEvent(this, "afOnDirty", 7);
        this.afOnTouched = createEvent(this, "afOnTouched", 7);
        this.afOnReady = createEvent(this, "afOnReady", 3);
        this.dirty = false;
        this.touched = false;
        this.afLabel = undefined;
        this.afVariation = FormRadiobuttonVariation.PRIMARY;
        this.afLayout = FormRadiobuttonLayout.INLINE;
        this.afName = undefined;
        this.afId = randomIdGenerator('digi-form-radiobutton');
        this.afRequired = undefined;
        this.value = undefined;
        this.afValue = undefined;
        this.checked = undefined;
        this.afChecked = undefined;
        this.afValidation = undefined;
        this.afAriaLabelledby = undefined;
        this.afAriaDescribedby = undefined;
        this.afAutofocus = undefined;
    }
    onValueChanged(newValue) {
        this.afChecked = newValue === this.afValue;
    }
    onCheckedChanged(checked) {
        this.afChecked = checked;
    }
    onAfCheckedChanged(checked) {
        this.checked = checked;
    }
    /**
     * Hämta en referens till inputelementet. Bra för att t.ex. sätta fokus programmatiskt.
     * @en Returns a reference to the input element. Handy for setting focus programmatically.
     */
    async afMGetFormControlElement() {
        return this._input;
    }
    componentDidLoad() {
        this.afOnReady.emit();
    }
    get cssModifiers() {
        return {
            'digi-form-radiobutton--error': this.afValidation === FormRadiobuttonValidation.ERROR,
            'digi-form-radiobutton--primary': this.afVariation === FormRadiobuttonVariation.PRIMARY,
            'digi-form-radiobutton--secondary': this.afVariation === FormRadiobuttonVariation.SECONDARY,
            [`digi-form-radiobutton--layout-${this.afLayout}`]: !!this.afLayout
        };
    }
    blurHandler(e) {
        if (!this.touched) {
            this.afOnTouched.emit(e);
            this.touched = true;
        }
        this.afOnBlur.emit(e);
    }
    changeHandler(e) {
        this.afOnChange.emit(e);
    }
    focusHandler(e) {
        this.afOnFocus.emit(e);
    }
    focusoutHandler(e) {
        this.afOnFocusout.emit(e);
    }
    inputHandler(e) {
        if (!this.dirty) {
            this.afOnDirty.emit(e);
            this.dirty = true;
        }
        this.afOnInput.emit(e);
    }
    render() {
        return (h("div", { key: '737e9170ca2163d53242b72a0879d5f2da68d0b5', class: Object.assign({ 'digi-form-radiobutton': true }, this.cssModifiers) }, h("input", { key: '41378b14eef9d3d368d80af26da4bfd9f02735fd', class: "digi-form-radiobutton__input", ref: (el) => (this._input = el), onInput: (e) => this.inputHandler(e), onBlur: (e) => this.blurHandler(e), onChange: (e) => this.changeHandler(e), onFocus: (e) => this.focusHandler(e), onFocusout: (e) => this.focusoutHandler(e), "aria-describedby": this.afAriaDescribedby, "aria-labelledby": this.afAriaLabelledby, "aria-invalid": this.afValidation === FormRadiobuttonValidation.ERROR
                ? 'true'
                : 'false', required: this.afRequired, id: this.afId, name: this.afName, type: "radio", checked: this.afChecked, value: this.afValue, autofocus: this.afAutofocus ? this.afAutofocus : null }), h("label", { key: '0c4271258b15b2f8cecdd9762ed092b95afae3a2', htmlFor: this.afId, class: "digi-form-radiobutton__label" }, h("span", { key: '5a1de90ad6c18d08d947261936b03b131d6b9d46', class: "digi-form-radiobutton__circle" }), this.afLabel)));
    }
    get hostElement() { return getElement(this); }
    static get watchers() { return {
        "value": ["onValueChanged"],
        "checked": ["onCheckedChanged"],
        "afChecked": ["onAfCheckedChanged"]
    }; }
};
FormRadiobutton.style = DigiFormRadiobuttonStyle0;

export { CodeBlock as digi_code_block, FormFieldset as digi_form_fieldset, FormRadiobutton as digi_form_radiobutton };
