{"version":3,"sources":["../../../src/components/VCounter/VCounter.ts"],"names":[],"mappings":";;;AACA,OAAO,+CAAP;AAEA;AACA,OAAO,SAAP,IAAoB,sBAApB,QAAkD,wBAAlD;AAIA,OAAO,MAAP,MAAmB,mBAAnB;AAEA;AACA,eAAe,OAAO,SAAP,EAAkB,MAAlB,CAAyB;AACtC,UAAM,WADgC;AAGtC,gBAAY,IAH0B;AAKtC,WAAO;AACL,eAAO;AACL,kBAAM,CAAC,MAAD,EAAS,MAAT,CADD;AAEL,qBAAS;AAFJ,SADF;AAKL,aAAK,CAAC,MAAD,EAAS,MAAT;AALA,KAL+B;AAatC,UAbsC,kBAa9B,CAb8B,EAa3B,GAb2B,EAaxB;AAAA,YACJ,KADI,GACM,GADN,CACJ,KADI;;AAEZ,YAAM,MAAM,SAAS,MAAM,GAAf,EAAoB,EAApB,CAAZ;AACA,YAAM,QAAQ,SAAS,MAAM,KAAf,EAAsB,EAAtB,CAAd;AACA,YAAM,UAAU,MAAS,KAAT,WAAoB,GAApB,GAA4B,OAAO,MAAM,KAAb,CAA5C;AACA,YAAM,YAAY,OAAQ,QAAQ,GAAlC;AAEA,eAAO,EAAE,KAAF,EAAS;AACd,yBAAa,WADC;AAEd;AACE,+BAAe;AADjB,eAEK,uBAAuB,GAAvB,CAFL;AAFc,SAAT,EAMJ,OANI,CAAP;AAOD;AA3BqC,CAAzB,CAAf","sourcesContent":["// Styles\nimport '../../stylus/components/_counters.styl'\n\n// Mixins\nimport Themeable, { functionalThemeClasses } from '../../mixins/themeable'\n\n// Types\nimport { VNode } from 'vue'\nimport mixins from '../../util/mixins'\n\n/* @vue/component */\nexport default mixins(Themeable).extend({\n name: 'v-counter',\n\n functional: true,\n\n props: {\n value: {\n type: [Number, String],\n default: ''\n },\n max: [Number, String]\n },\n\n render (h, ctx): VNode {\n const { props } = ctx\n const max = parseInt(props.max, 10)\n const value = parseInt(props.value, 10)\n const content = max ? `${value} / ${max}` : String(props.value)\n const isGreater = max && (value > max)\n\n return h('div', {\n staticClass: 'v-counter',\n class: {\n 'error--text': isGreater,\n ...functionalThemeClasses(ctx)\n }\n }, content)\n }\n})\n"],"sourceRoot":""}