'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-7a477838.js');
const codeExampleVariation_enum = require('./code-example-variation.enum-1611825e.js');
const typographyVariation_enum = require('./typography-variation.enum-8fd8bed4.js');
const prismGit = require('./prism-git-df985529.js');
require('./badge-notification-shape.enum-ff802554.js');
require('./badge-status-variation.enum-0a5adc21.js');
require('./form-input-search-variation.enum-e0e025b1.js');
const buttonVariation_enum = require('./button-variation.enum-bc521499.js');
require('./calendar-week-view-heading-level.enum-fd0c841b.js');
require('./code-variation.enum-c4a4e6fd.js');
require('./expandable-accordion-header-level.enum-45483252.js');
require('./expandable-faq-item-variation.enum-89427195.js');
require('./expandable-faq-variation.enum-af923f49.js');
require('./footer-card-variation.enum-99555edc.js');
require('./form-checkbox-variation.enum-d2ca879e.js');
require('./form-file-upload-variation.enum-634cfae8.js');
require('./form-input-type.enum-9c8ee12a.js');
require('./form-input-variation.enum-c750520c.js');
require('./form-select-variation.enum-528c1bf0.js');
require('./form-textarea-variation.enum-9c90d40f.js');
require('./form-validation-message-variation.enum-855ae0be.js');
require('./info-card-multi-type.enum-14746572.js');
require('./info-card-variation.enum-64cef637.js');
require('./layout-block-variation.enum-f6102119.js');
require('./layout-columns-variation.enum-65675649.js');
require('./link-button-variation.enum-137785e3.js');
require('./list-type.enum-aea4d012.js');
require('./loader-skeleton-variation.enum-d52ba55e.js');
require('./loader-spinner-size.enum-db2973f0.js');
require('./logo-variation.enum-607fadb4.js');
require('./media-figure-alignment.enum-3885aba5.js');
require('./navigation-sidebar-variation.enum-1c0c3064.js');
require('./progress-indicator-variation.enum-7cf8e0e4.js');
require('./progress-list-item-variation.enum-90e4c874.js');
require('./progress-list-variation.enum-06d5ce27.js');
require('./progressbar-variation.enum-aff9fa80.js');
require('./quote-image-inner-position.enum-e64e7a6d.js');
require('./table-variation.enum-25df2ad7.js');
require('./tag-media-icon.enum-372563c5.js');
require('./tag-size.enum-387c516c.js');
require('./tools-feedback-banner-type.enum-de373ba0.js');
require('./tools-feedback-rating-variation.enum-2f71e84d.js');
require('./tools-theme-provider.brand.enum-bc855272.js');
require('./typography-heading-jumbo-variation.enum-8677e099.js');
require('./typography-meta-variation.enum-13ac3538.js');
require('./typography-time-variation.enum-bce1d87e.js');
require('./util-breakpoint-observer-breakpoints.enum-e96d3a84.js');
const text = require('./text-3157012b.js');
const randomIdGenerator_util = require('./randomIdGenerator.util-e7f4b6de.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) {
        index.registerInstance(this, hostRef);
        this.highlightedCode = undefined;
        this.afCode = undefined;
        this.afVariation = codeExampleVariation_enum.CodeBlockVariation.DARK;
        this.afLanguage = typographyVariation_enum.CodeBlockLanguage.HTML;
        this.afLang = 'en';
        this.afHideToolbar = false;
    }
    componentWillLoad() {
        prismGit.Prism.manual = true;
        this.formatCode();
    }
    formatCode() {
        this.highlightedCode = prismGit.Prism.highlight(this.afCode, prismGit.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 === codeExampleVariation_enum.CodeBlockVariation.LIGHT,
            'digi-code-block--dark': this.afVariation === codeExampleVariation_enum.CodeBlockVariation.DARK
        };
    }
    render() {
        return (index.h("div", { key: '0e303cbfa97ce3236ed4371b4c45936081f0b8b3', class: Object.assign({ 'digi-code-block': true }, this.cssModifiers) }, index.h("pre", { key: 'b0ed125798e6a05dcfc29af8b35b483492be1e6e', class: `digi-code-block__pre language-${this.afLanguage}` }, index.h("code", { key: 'fe91928297c3833d7e17cefe283c75a47b0e229b', class: "digi-code-block__code", lang: this.afLang, innerHTML: this.highlightedCode })), !this.afHideToolbar && (index.h("div", { key: '1bde0cbe8ef10b1eb08cca1e2eac67ea2caf7eb2', class: "digi-code-block__toolbar" }, index.h("digi-button", { key: '66823907ac7bb38d4b6b23fdd3a875b4fe38ddff', class: "digi-code-block__button", onAfOnClick: () => this.copyButtonClickHandler(), afVariation: buttonVariation_enum.ButtonVariation.FUNCTION, afSize: codeExampleVariation_enum.ButtonSize.SMALL }, index.h("digi-icon-copy", { key: '4329fa1556960690d691b32b59801fbdbd07d390', class: "digi-code-block__icon", "aria-hidden": "true", slot: "icon" }), text._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) {
        index.registerInstance(this, hostRef);
        this.afLegend = undefined;
        this.afName = undefined;
        this.afForm = undefined;
        this.afId = randomIdGenerator_util.randomIdGenerator('digi-form-fieldset');
    }
    render() {
        return (index.h("fieldset", { key: 'd8cfa4b3327565bd8c480783ffe63ec305347ea3', class: "digi-form-fieldset", name: this.afName, form: this.afForm, id: this.afId }, this.afLegend && (index.h("legend", { key: 'e625744d0d70e80ba53f55825c616d49a4b7b46c', class: "digi-form-fieldset__legend" }, this.afLegend)), index.h("slot", { key: '0ebfd14cb6e8c83a2aa9b5679909f529c9a3127a' })));
    }
};
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) {
        index.registerInstance(this, hostRef);
        this.afOnChange = index.createEvent(this, "afOnChange", 7);
        this.afOnBlur = index.createEvent(this, "afOnBlur", 7);
        this.afOnFocus = index.createEvent(this, "afOnFocus", 7);
        this.afOnFocusout = index.createEvent(this, "afOnFocusout", 7);
        this.afOnInput = index.createEvent(this, "afOnInput", 7);
        this.afOnDirty = index.createEvent(this, "afOnDirty", 7);
        this.afOnTouched = index.createEvent(this, "afOnTouched", 7);
        this.afOnReady = index.createEvent(this, "afOnReady", 3);
        this.dirty = false;
        this.touched = false;
        this.afLabel = undefined;
        this.afVariation = typographyVariation_enum.FormRadiobuttonVariation.PRIMARY;
        this.afLayout = typographyVariation_enum.FormRadiobuttonLayout.INLINE;
        this.afName = undefined;
        this.afId = randomIdGenerator_util.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 === typographyVariation_enum.FormRadiobuttonValidation.ERROR,
            'digi-form-radiobutton--primary': this.afVariation === typographyVariation_enum.FormRadiobuttonVariation.PRIMARY,
            'digi-form-radiobutton--secondary': this.afVariation === typographyVariation_enum.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 (index.h("div", { key: '1b046e21ba80dbb97f44e0634ea6298c0a2556b1', class: Object.assign({ 'digi-form-radiobutton': true }, this.cssModifiers) }, index.h("input", { key: 'a8dc1005905e4c0c4ac50acda225b4a1a6b6687a', 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 === typographyVariation_enum.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 }), index.h("label", { key: '3488133e2d6395c47729e94b0a6d03bd5ebeb05d', htmlFor: this.afId, class: "digi-form-radiobutton__label" }, index.h("span", { key: '3a19b4ee6390bb041a96372b07f4ff71b3f5193a', class: "digi-form-radiobutton__circle" }), this.afLabel)));
    }
    get hostElement() { return index.getElement(this); }
    static get watchers() { return {
        "value": ["onValueChanged"],
        "checked": ["onCheckedChanged"],
        "afChecked": ["onAfCheckedChanged"]
    }; }
};
FormRadiobutton.style = DigiFormRadiobuttonStyle0;

exports.digi_code_block = CodeBlock;
exports.digi_form_fieldset = FormFieldset;
exports.digi_form_radiobutton = FormRadiobutton;
