/**
 * Copyright © Volker Schukai and all contributing authors, 2026. All rights reserved.
 * Node module: @schukai/monster
 *
 * This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
 * The full text of the license can be found at: https://www.gnu.org/licenses/agpl-3.0.en.html
 *
 * For those who do not wish to adhere to the AGPLv3, a commercial license is available.
 * Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
 * For more information about purchasing a commercial license, please contact Volker Schukai.
 */

import { addAttributeToken } from "../../../dom/attributes.mjs";
import { ATTRIBUTE_ERRORMESSAGE } from "../../../dom/constants.mjs";

export { ControlBarSpacerStyleSheet };

/**
 * @private
 * @type {CSSStyleSheet}
 */
const ControlBarSpacerStyleSheet = new CSSStyleSheet();

try {
	ControlBarSpacerStyleSheet.insertRule(
		`
@layer controlbarspacer {
.block{display:block}.inline{display:inline}.inline-block{display:inline-block}.grid{display:grid}.inline-grid{display:inline-grid}.flex{display:flex}.inline-flex{display:inline-flex}.hidden,.hide,.none{display:none}.visible{visibility:visible}.invisible{visibility:hidden}:host{--monster-control-bar-spacer-inline-size:0.8rem;--monster-control-bar-spacer-block-size:100%;--monster-control-bar-spacer-line-inline-size:var(--monster-border-width);--monster-control-bar-spacer-line-block-size:60%;--monster-control-bar-spacer-line-color:var(--monster-theme-control-border-color,var(--monster-bg-color-primary-4));display:flex;flex:0 0 auto;box-sizing:border-box;align-items:center;justify-content:center;width:var(--monster-control-bar-spacer-inline-size);min-width:var(--monster-control-bar-spacer-inline-size);height:var(--monster-control-bar-spacer-block-size);min-height:var(--monster-control-bar-spacer-block-size);pointer-events:none}[data-monster-role=separator]{display:block;box-sizing:border-box;width:var(--monster-control-bar-spacer-line-inline-size);height:var(--monster-control-bar-spacer-line-block-size);background-color:var(--monster-control-bar-spacer-line-color)}
}`,
		0,
	);
} catch (e) {
	addAttributeToken(
		document.getRootNode().querySelector("html"),
		ATTRIBUTE_ERRORMESSAGE,
		e + "",
	);
}
