{"version":3,"file":"useFormCheck-Bcx8Ea7M-Bf6xB0YW.js","sources":["../../../node_modules/bootstrap-vue-next/dist/useFormCheck-Bcx8Ea7M.mjs"],"sourcesContent":["import { computed, toValue, readonly, toRef } from \"vue\";\nimport { u as useAriaInvalid } from \"./useAriaInvalid-BTUbGj3Y.mjs\";\nimport { u as useStateClass } from \"./useStateClass-BGbSLWFN.mjs\";\nconst getClasses = (items) => computed(() => {\n const resolvedItems = toValue(items);\n return {\n \"form-check\": resolvedItems.plain === false && resolvedItems.button === false && resolvedItems.hasDefaultSlot,\n \"form-check-reverse\": resolvedItems.reverse === true,\n \"form-check-inline\": resolvedItems.inline === true,\n \"form-switch\": resolvedItems.switch === true,\n [`form-control-${resolvedItems.size}`]: resolvedItems.size !== void 0 && resolvedItems.size !== \"md\" && resolvedItems.button === false\n };\n});\nconst getInputClasses = (items) => {\n const resolvedItems = readonly(toRef(items));\n const stateClass = useStateClass(() => resolvedItems.value.state ?? null);\n return computed(() => [\n stateClass.value,\n {\n \"form-check-input\": resolvedItems.value.plain === false && resolvedItems.value.button === false,\n \"btn-check\": resolvedItems.value.button === true\n }\n ]);\n};\nconst getLabelClasses = (items) => computed(() => {\n const resolvedItems = toValue(items);\n return {\n \"form-check-label\": resolvedItems.plain === false && resolvedItems.button === false,\n \"btn\": resolvedItems.button === true,\n [`btn-${resolvedItems.buttonVariant}`]: resolvedItems.button === true && resolvedItems.buttonVariant !== void 0 && resolvedItems.buttonVariant !== null,\n [`btn-${resolvedItems.size}`]: resolvedItems.button && resolvedItems.size && resolvedItems.size !== \"md\"\n };\n});\nconst getGroupAttr = (items) => {\n const resolvedItems = readonly(toRef(items));\n const computedAriaInvalid = useAriaInvalid(\n () => resolvedItems.value.ariaInvalid,\n () => resolvedItems.value.state\n );\n return computed(() => ({\n \"aria-invalid\": computedAriaInvalid.value,\n \"aria-required\": resolvedItems.value.required === true ? true : void 0\n }));\n};\nconst getGroupClasses = (items) => computed(() => {\n const resolvedItems = toValue(items);\n return {\n \"was-validated\": resolvedItems.validated === true,\n \"btn-group\": resolvedItems.buttons === true && resolvedItems.stacked === false,\n \"btn-group-vertical\": resolvedItems.stacked === true && resolvedItems.buttons === true,\n [`btn-group-${resolvedItems.size}`]: resolvedItems.size !== void 0\n };\n});\nexport {\n getInputClasses as a,\n getLabelClasses as b,\n getGroupAttr as c,\n getGroupClasses as d,\n getClasses as g\n};\n//# sourceMappingURL=useFormCheck-Bcx8Ea7M.mjs.map\n"],"names":["getClasses","items","computed","resolvedItems","toValue","getInputClasses","readonly","toRef","stateClass","useStateClass","getLabelClasses"],"mappings":"ifAGK,MAACA,EAAcC,GAAUC,EAAS,IAAM,CAC3C,MAAMC,EAAgBC,EAAQH,CAAK,EACnC,MAAO,CACL,aAAcE,EAAc,QAAU,IAASA,EAAc,SAAW,IAASA,EAAc,eAC/F,qBAAsBA,EAAc,UAAY,GAChD,oBAAqBA,EAAc,SAAW,GAC9C,cAAeA,EAAc,SAAW,GACxC,CAAC,gBAAgBA,EAAc,IAAI,EAAE,EAAGA,EAAc,OAAS,QAAUA,EAAc,OAAS,MAAQA,EAAc,SAAW,EAClI,CACH,CAAC,EACKE,EAAmBJ,GAAU,CACjC,MAAME,EAAgBG,EAASC,EAAMN,CAAK,CAAC,EACrCO,EAAaC,EAAc,IAAMN,EAAc,MAAM,OAAS,IAAI,EACxE,OAAOD,EAAS,IAAM,CACpBM,EAAW,MACX,CACE,mBAAoBL,EAAc,MAAM,QAAU,IAASA,EAAc,MAAM,SAAW,GAC1F,YAAaA,EAAc,MAAM,SAAW,EAClD,CACA,CAAG,CACH,EACMO,EAAmBT,GAAUC,EAAS,IAAM,CAChD,MAAMC,EAAgBC,EAAQH,CAAK,EACnC,MAAO,CACL,mBAAoBE,EAAc,QAAU,IAASA,EAAc,SAAW,GAC9E,IAAOA,EAAc,SAAW,GAChC,CAAC,OAAOA,EAAc,aAAa,EAAE,EAAGA,EAAc,SAAW,IAAQA,EAAc,gBAAkB,QAAUA,EAAc,gBAAkB,KACnJ,CAAC,OAAOA,EAAc,IAAI,EAAE,EAAGA,EAAc,QAAUA,EAAc,MAAQA,EAAc,OAAS,IACrG,CACH,CAAC","x_google_ignoreList":[0]}