{"version":3,"file":"useRadiusElementClasses-ppH4Pr03.mjs","names":[],"sources":["../src/composables/useRadiusElementClasses.ts"],"sourcesContent":["import {computed, type MaybeRefOrGetter, toValue} from 'vue'\nimport type {RadiusElement, RadiusElementExtendables} from '../types/RadiusElement'\n\nexport const useRadiusElementClasses = (obj: MaybeRefOrGetter<RadiusElementExtendables>) => {\n  const resolveRadiusElement = (\n    value: true | RadiusElement,\n    str: 'top' | 'bottom' | 'start' | 'end' | null\n  ): string => {\n    const strValue = str === null ? '' : `-${str}`\n\n    return value === 'circle'\n      ? `rounded${strValue}-circle`\n      : value === 'pill'\n        ? `rounded${strValue}-pill`\n        : typeof value === 'number' ||\n            value === '0' ||\n            value === '1' ||\n            value === '2' ||\n            value === '3' ||\n            value === '4' ||\n            value === '5'\n          ? `rounded${strValue}-${value}`\n          : value === 'none'\n            ? `rounded${strValue}-0`\n            : value === 'sm'\n              ? `rounded${strValue}-1`\n              : value === 'lg'\n                ? `rounded${strValue}-5`\n                : `rounded${strValue}` // true is last\n  }\n\n  return computed(() => {\n    const props = toValue(obj)\n\n    return {\n      [`${resolveRadiusElement(props.rounded as true | RadiusElement, null)}`]: !!props.rounded,\n      [`${resolveRadiusElement(props.roundedTop as true | RadiusElement, 'top')}`]:\n        !!props.roundedTop,\n      [`${resolveRadiusElement(props.roundedBottom as true | RadiusElement, 'bottom')}`]:\n        !!props.roundedBottom,\n      [`${resolveRadiusElement(props.roundedStart as true | RadiusElement, 'start')}`]:\n        !!props.roundedStart,\n      [`${resolveRadiusElement(props.roundedEnd as true | RadiusElement, 'end')}`]:\n        !!props.roundedEnd,\n    }\n  })\n}\n"],"mappings":";;AAGA,IAAa,2BAA2B,QAAoD;CAC1F,MAAM,wBACJ,OACA,QACW;EACX,MAAM,WAAW,QAAQ,OAAO,KAAK,IAAI;AAEzC,SAAO,UAAU,WACb,UAAU,SAAS,WACnB,UAAU,SACR,UAAU,SAAS,SACnB,OAAO,UAAU,YACf,UAAU,OACV,UAAU,OACV,UAAU,OACV,UAAU,OACV,UAAU,OACV,UAAU,MACV,UAAU,SAAS,GAAG,UACtB,UAAU,SACR,UAAU,SAAS,MACnB,UAAU,OACR,UAAU,SAAS,MACnB,UAAU,OACR,UAAU,SAAS,MACnB,UAAU;;AAG1B,QAAO,eAAe;EACpB,MAAM,QAAQ,QAAQ,IAAI;AAE1B,SAAO;IACJ,GAAG,qBAAqB,MAAM,SAAiC,KAAK,KAAK,CAAC,CAAC,MAAM;IACjF,GAAG,qBAAqB,MAAM,YAAoC,MAAM,KACvE,CAAC,CAAC,MAAM;IACT,GAAG,qBAAqB,MAAM,eAAuC,SAAS,KAC7E,CAAC,CAAC,MAAM;IACT,GAAG,qBAAqB,MAAM,cAAsC,QAAQ,KAC3E,CAAC,CAAC,MAAM;IACT,GAAG,qBAAqB,MAAM,YAAoC,MAAM,KACvE,CAAC,CAAC,MAAM;GACX;GACD"}