"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;
            top: ${outlineOffset};
            left: ${outlineOffset};
            right: ${outlineOffset};
            bottom: ${outlineOffset};
            z-index: 1;

            display: block;
            box-sizing: content-box;

            border: ${outlineSize} solid transparent;
            border-radius: ${outlineRadius};

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

            pointer-events: none;
        }

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