require("../../../_virtual/_rolldown/runtime.cjs");
let lit_directive_js = require("lit/directive.js");
let lit_html = require("lit-html");
//#region src/shared/directives/custom-style-map/index.ts
var CustomStyleMapDirective = class extends lit_directive_js.Directive {
	constructor(partInfo) {
		super(partInfo);
		if (partInfo.type !== lit_directive_js.PartType.ATTRIBUTE || partInfo.name !== "style" || partInfo.strings?.length > 2) throw new Error("`customStyleMap()` can only be used in the `style` attribute and must be the only part in the attribute.");
	}
	render(styleInfoList) {
		const styles = Object.keys(styleInfoList).filter((key) => styleInfoList[key]);
		if (styles.length === 0) return lit_html.nothing;
		return ` ${styles.join("; ")} `;
	}
};
/**
* A directive that applies dynamic CSS styles.
* Since build in `styleMap` directive doesn't allow to add conditional styles
*
* Example `{'foo bar': baz}` applies the style `foo bar` if the value of `baz` is
* truthy.
*
* @param styleInfoList
*/
var customStyleMap = (0, lit_directive_js.directive)(CustomStyleMapDirective);
//#endregion
exports.CustomStyleMapDirective = CustomStyleMapDirective;
exports.customStyleMap = customStyleMap;
