"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "addFocus", {
    enumerable: true,
    get: function() {
        return addFocus;
    }
});
require("focus-visible");
const addFocus = (args)=>{
    const { customFocusRules, outlineSize = '0.125rem', outlineOffset = '0.125rem', outlineColor = 'var(--plasma-colors-button-focused, var(--text-accent))', outlineRadius = '30px', hasTransition = true } = args;
    return `
        position: relative;

        &::before {
            content: '';

            position: absolute;
            inset: 0;
            z-index: 1;

            border-radius: ${outlineRadius};

            outline: ${outlineSize} solid transparent;
            outline-offset: ${outlineOffset};

            transition: ${hasTransition ? 'outline-color 0.2s ease-in-out' : 'none'};

            pointer-events: none;
        }

        ${getCustomFocusStyle(outlineColor, customFocusRules)}
    `;
};
const getCustomFocusStyle = (outlineColor, customFocusRules)=>{
    if (!customFocusRules) {
        return `
            &.focus-visible:focus,
            &[data-focus-visible-added] {
                &::before {
                    outline-color: ${outlineColor};
                }
            }
        `;
    }
    return customFocusRules;
};
