import { useTextColor } from "./chunk-NW4NIPSU.js"; import { makeTagProps } from "./chunk-JH5IUXR2.js"; import { IconValue, useIcon } from "./chunk-2NYYH3MH.js"; import { makeThemeProps, useTheme } from "./chunk-ILOYNRQG.js"; import { convertToUnit, destructComputed, flattenFragments, genericComponent, getCurrentInstanceName, includes, makeComponentProps, propsFactory, useRender } from "./chunk-ADPJOAU6.js"; import { Text, createVNode, normalizeClass, normalizeStyle, shallowRef } from "./chunk-FIAHBV72.js"; // node_modules/vuetify/lib/components/VIcon/VIcon.js import "/Users/JasonJFraser/Desktop/apps/cmms/frontend/node_modules/vuetify/lib/components/VIcon/VIcon.css"; // node_modules/vuetify/lib/composables/size.js var predefinedSizes = ["x-small", "small", "default", "large", "x-large"]; var makeSizeProps = propsFactory({ size: { type: [String, Number], default: "default" } }, "size"); function useSize(props) { let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName(); return destructComputed(() => { const size = props.size; let sizeClasses; let sizeStyles; if (includes(predefinedSizes, size)) { sizeClasses = `${name}--size-${size}`; } else if (size) { sizeStyles = { width: convertToUnit(size), height: convertToUnit(size) }; } return { sizeClasses, sizeStyles }; }); } // node_modules/vuetify/lib/components/VIcon/VIcon.js var makeVIconProps = propsFactory({ color: String, disabled: Boolean, start: Boolean, end: Boolean, icon: IconValue, opacity: [String, Number], ...makeComponentProps(), ...makeSizeProps(), ...makeTagProps({ tag: "i" }), ...makeThemeProps() }, "VIcon"); var VIcon = genericComponent()({ name: "VIcon", props: makeVIconProps(), setup(props, _ref) { let { attrs, slots } = _ref; const slotIcon = shallowRef(); const { themeClasses } = useTheme(); const { iconData } = useIcon(() => slotIcon.value || props.icon); const { sizeClasses } = useSize(props); const { textColorClasses, textColorStyles } = useTextColor(() => props.color); useRender(() => { var _a, _b; const slotValue = (_a = slots.default) == null ? void 0 : _a.call(slots); if (slotValue) { slotIcon.value = (_b = flattenFragments(slotValue).filter((node) => node.type === Text && node.children && typeof node.children === "string")[0]) == null ? void 0 : _b.children; } const hasClick = !!(attrs.onClick || attrs.onClickOnce); return createVNode(iconData.value.component, { "tag": props.tag, "icon": iconData.value.icon, "class": normalizeClass(["v-icon", "notranslate", themeClasses.value, sizeClasses.value, textColorClasses.value, { "v-icon--clickable": hasClick, "v-icon--disabled": props.disabled, "v-icon--start": props.start, "v-icon--end": props.end }, props.class]), "style": normalizeStyle([{ "--v-icon-opacity": props.opacity }, !sizeClasses.value ? { fontSize: convertToUnit(props.size), height: convertToUnit(props.size), width: convertToUnit(props.size) } : void 0, textColorStyles.value, props.style]), "role": hasClick ? "button" : void 0, "aria-hidden": !hasClick, "tabindex": hasClick ? props.disabled ? -1 : 0 : void 0 }, { default: () => [slotValue] }); }); return {}; } }); export { makeSizeProps, useSize, VIcon }; //# sourceMappingURL=chunk-QWPWQWFR.js.map