import { computed } from "vue";
import { useInkline } from "@inkline/inkline/composables/useInkline";
export function useComponentSize(props) {
  const inkline = useInkline();
  const size = computed(() => {
    let sizeClass = props.currentSize.value || "md";
    if (!props.currentSize.value && inkline?.options) {
      if (inkline.options.componentOptions[props.componentName]?.size) {
        sizeClass = inkline.options.componentOptions[props.componentName]?.size;
      } else if (inkline.options.size) {
        sizeClass = inkline.options.size;
      }
    }
    return sizeClass;
  });
  return { size };
}
