import { e, i, t } from './directive-2bb7789e.js';

class CustomClassMapDirective extends i {
  constructor(partInfo) {
    super(partInfo);
    if (partInfo.type !== t.ATTRIBUTE || partInfo.name !== "class" || partInfo.strings?.length > 2) {
      throw new Error(
        "`customClassMap()` can only be used in the `class` attribute and must be the only part in the attribute."
      );
    }
  }
  render(classInfoList) {
    return " " + Object.keys(classInfoList).filter((key) => classInfoList[key]).join(" ") + " ";
  }
}
const customClassMap = e(CustomClassMapDirective);

export { customClassMap as c };
