import{__exports as e}from"../../../_virtual/Label.js";import t from"react";import{p as r}from"../../prop-types/index.js";import{c as o}from"../../classnames/index.js";import"./utils.js";import{__exports as a}from"../../../_virtual/utils.js";!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=u(t),s=u(r),n=u(o),c=a,f=["className","cssModule","hidden","widths","tag","check","size","for"];function u(e){return e&&e.__esModule?e:{default:e}}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},i.apply(this,arguments)}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(null==e)return{};var r,o,a=function(e,t){if(null==e)return{};var r,o,a={},l=Object.keys(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var m=s.default.oneOfType([s.default.number,s.default.string]),b=s.default.oneOfType([s.default.bool,s.default.string,s.default.number,s.default.shape({size:m,order:m,offset:m})]),h={children:s.default.node,hidden:s.default.bool,check:s.default.bool,size:s.default.string,for:s.default.string,tag:c.tagPropType,className:s.default.string,cssModule:s.default.object,xs:b,sm:b,md:b,lg:b,xl:b,xxl:b,widths:s.default.array},g={tag:"label",widths:["xs","sm","md","lg","xl","xxl"]},v=function(e,t,r){return!0===r||""===r?e?"col":"col-".concat(t):"auto"===r?e?"col-auto":"col-".concat(t,"-auto"):e?"col-".concat(r):"col-".concat(t,"-").concat(r)};function y(e){var t=e.className,r=e.cssModule,o=e.hidden,a=e.widths,s=e.tag,u=e.check,m=e.size,b=e.for,h=p(e,f),g=[];a.forEach((function(t,o){var a=e[t];if(delete h[t],a||""===a){var l,s=!o;if((0,c.isObject)(a)){var f,u=s?"-":"-".concat(t,"-");l=v(s,t,a.size),g.push((0,c.mapToCssModules)((0,n.default)((d(f={},l,a.size||""===a.size),d(f,"order".concat(u).concat(a.order),a.order||0===a.order),d(f,"offset".concat(u).concat(a.offset),a.offset||0===a.offset),f))),r)}else l=v(s,t,a),g.push(l)}}));var y=m||g.length,O=!(u||y),j=(0,c.mapToCssModules)((0,n.default)(t,!!o&&"visually-hidden",!!u&&"form-check-label",!!m&&"col-form-label-".concat(m),g,!!y&&"col-form-label",!!O&&"form-label"),r);return l.default.createElement(s,i({htmlFor:b},h,{className:j}))}y.propTypes=h,y.defaultProps=g;var O=y;e.default=O}(e);
//# sourceMappingURL=Label.js.map
