Rocky_Mountain_Vending/.pnpm-store/v10/files/94/b76cee6616f74e030220e0c9758847b576acec6a62833b2a82de97f0631e7812d91b8d7c42b75899386825a15df87b62b41edebe7784267d69d1b4be3ce5b3
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

34 lines
No EOL
1.4 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getClassNamesForModifiers = getClassNamesForModifiers;
const UI_js_1 = require("../UI.js");
/**
* Returns the class names for a day based on its modifiers.
*
* This function combines the base class name for the day with any class names
* associated with active modifiers.
*
* @param modifiers The modifiers applied to the day.
* @param classNames The base class names for the calendar elements.
* @param modifiersClassNames The class names associated with specific
* modifiers.
* @returns An array of class names for the day.
*/
function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
const modifierClassNames = Object.entries(modifiers)
.filter(([, active]) => active === true)
.reduce((previousValue, [key]) => {
if (modifiersClassNames[key]) {
previousValue.push(modifiersClassNames[key]);
}
else if (classNames[UI_js_1.DayFlag[key]]) {
previousValue.push(classNames[UI_js_1.DayFlag[key]]);
}
else if (classNames[UI_js_1.SelectionState[key]]) {
previousValue.push(classNames[UI_js_1.SelectionState[key]]);
}
return previousValue;
}, [classNames[UI_js_1.UI.Day]]);
return modifierClassNames;
}
//# sourceMappingURL=getClassNamesForModifiers.js.map