// Utilities
import { toRef } from 'vue';
import { getCurrentInstanceName, propsFactory } from "../util/index.js"; // Types
const allowedDensities = [null, 'default', 'comfortable', 'compact'];

// typeof allowedDensities[number] evaluates to any
// when generating api types for whatever reason.

// Composables
export const makeDensityProps = propsFactory({
  density: {
    type: String,
    default: 'default',
    validator: v => allowedDensities.includes(v)
  }
}, 'density');
export function useDensity(props, name = getCurrentInstanceName()) {
  const densityClasses = toRef(() => {
    return `${name}--density-${props.density}`;
  });
  return {
    densityClasses
  };
}
//# sourceMappingURL=density.js.map