"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "addFocus", {
    enumerable: true,
    get: function() {
        return addFocus;
    }
});
require("focus-visible");
var addFocus = function addFocus(args) {
    var customFocusRules = args.customFocusRules, _args_outlineSize = args.outlineSize, outlineSize = _args_outlineSize === void 0 ? '0.125rem' : _args_outlineSize, _args_outlineOffset = args.outlineOffset, outlineOffset = _args_outlineOffset === void 0 ? '-0.125rem' : _args_outlineOffset, _args_outlineColor = args.outlineColor, outlineColor = _args_outlineColor === void 0 ? 'var(--plasma-colors-button-focused, var(--text-accent))' : _args_outlineColor, _args_outlineRadius = args.outlineRadius, outlineRadius = _args_outlineRadius === void 0 ? '30px' : _args_outlineRadius, _args_hasTransition = args.hasTransition, hasTransition = _args_hasTransition === void 0 ? true : _args_hasTransition;
    return "\n        position: relative;\n\n        &::before {\n            content: '';\n\n            position: absolute;\n            top: ".concat(outlineOffset, ";\n            left: ").concat(outlineOffset, ";\n            right: ").concat(outlineOffset, ";\n            bottom: ").concat(outlineOffset, ";\n            z-index: 1;\n\n            display: block;\n            box-sizing: content-box;\n\n            border: ").concat(outlineSize, " solid transparent;\n            border-radius: ").concat(outlineRadius, ";\n\n            transition: ").concat(hasTransition ? 'box-shadow 0.2s ease-in-out' : 'none', ";\n\n            pointer-events: none;\n        }\n\n        ").concat(getCustomFocusStyle(outlineSize, outlineColor, customFocusRules), "\n    ");
};
var getCustomFocusStyle = function getCustomFocusStyle(outlineSize, outlineColor, customFocusRules) {
    if (!customFocusRules) {
        return "\n            &.focus-visible:focus,\n            &[data-focus-visible-added] {\n                &::before {\n                    outline: none;\n                    box-shadow: 0 0 0 ".concat(outlineSize, " ").concat(outlineColor, ";\n                }\n            }\n        ");
    }
    return customFocusRules;
};
