"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useComponentSize = useComponentSize;
var _vue = require("vue");
var _useInkline = require("@inkline/inkline/composables/useInkline");
function useComponentSize(props) {
  const inkline = (0, _useInkline.useInkline)();
  const size = (0, _vue.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
  };
}