"use strict";
const vue = require("vue");
const useAriaInvalid = require("./useAriaInvalid-Caxf1WW4.js");
const useStateClass = require("./useStateClass-Bk6-veG2.js");
const getClasses = (items) => vue.computed(() => {
  const resolvedItems = vue.toValue(items);
  return {
    "form-check": !resolvedItems.plain && !resolvedItems.button && resolvedItems.hasDefaultSlot,
    "form-check-reverse": resolvedItems.reverse === true,
    "form-check-inline": resolvedItems.inline === true,
    "form-switch": resolvedItems.switch === true,
    [`form-control-${resolvedItems.size}`]: resolvedItems.size !== void 0 && resolvedItems.size !== "md" && !resolvedItems.button
  };
});
const getInputClasses = (items) => {
  const resolvedItems = vue.readonly(vue.toRef(items));
  const stateClass = useStateClass.useStateClass(() => resolvedItems.value.state ?? null);
  return vue.computed(() => [
    stateClass.value,
    {
      "form-check-input": !resolvedItems.value.plain && !resolvedItems.value.button,
      "btn-check": resolvedItems.value.button === true
    }
  ]);
};
const getLabelClasses = (items) => vue.computed(() => {
  const resolvedItems = vue.toValue(items);
  return {
    "form-check-label": !resolvedItems.plain && !resolvedItems.button,
    "btn": resolvedItems.button === true,
    [`btn-${resolvedItems.buttonVariant}`]: resolvedItems.button === true && resolvedItems.buttonVariant !== void 0 && resolvedItems.buttonVariant !== null,
    [`btn-${resolvedItems.size}`]: resolvedItems.button && resolvedItems.size && resolvedItems.size !== "md"
  };
});
const getGroupAttr = (items) => {
  const resolvedItems = vue.readonly(vue.toRef(items));
  const computedAriaInvalid = useAriaInvalid.useAriaInvalid(
    () => resolvedItems.value.ariaInvalid,
    () => resolvedItems.value.state
  );
  return vue.computed(() => ({
    "aria-invalid": computedAriaInvalid.value,
    "aria-required": resolvedItems.value.required === true ? true : void 0
  }));
};
const getGroupClasses = (items) => vue.computed(() => {
  const resolvedItems = vue.toValue(items);
  return {
    "was-validated": resolvedItems.validated === true,
    "btn-group": resolvedItems.buttons === true && resolvedItems.stacked === false,
    "btn-group-vertical": resolvedItems.stacked === true && resolvedItems.buttons === true,
    [`btn-group-${resolvedItems.size}`]: resolvedItems.size !== void 0
  };
});
exports.getClasses = getClasses;
exports.getGroupAttr = getGroupAttr;
exports.getGroupClasses = getGroupClasses;
exports.getInputClasses = getInputClasses;
exports.getLabelClasses = getLabelClasses;
//# sourceMappingURL=useFormCheck-BKc2jzu9.js.map
