{"version":3,"file":"checkBox.obs.js","sources":["../../../Framework/Controls/checkBox.obs"],"sourcesContent":["<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <RockFormField\r\n :modelValue=\"modelValue\"\r\n :label=\"label\"\r\n formGroupClasses=\"rock-check-box\"\r\n name=\"checkbox\">\r\n <template #default=\"{ uniqueId, field }\">\r\n <div class=\"control-wrapper\">\r\n <div class=\"checkbox\">\r\n <label class=\"rock-checkbox-icon\">\r\n <input type=\"checkbox\" v-bind=\"field\" v-model=\"internalValue\" :id=\"uniqueId\" />\r\n <span class=\"label-text\"> {{ text }}</span>\r\n </label>\r\n </div>\r\n </div>\r\n </template>\r\n </RockFormField>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { PropType, ref, watch } from \"vue\";\r\n import RockFormField from \"./rockFormField.obs\";\r\n\r\n const props = defineProps({\r\n modelValue: {\r\n type: Boolean as PropType<boolean>,\r\n required: true\r\n },\r\n\r\n label: {\r\n type: String as PropType<string>,\r\n required: true\r\n },\r\n\r\n rules: {\r\n type: String as PropType<string>,\r\n default: \"\"\r\n },\r\n\r\n text: {\r\n type: String as PropType<string>,\r\n default: \"\"\r\n }\r\n });\r\n\r\n const emit = defineEmits<{\r\n (e: \"update:modelValue\", value: boolean): void;\r\n }>();\r\n\r\n const internalValue = ref(props.modelValue);\r\n\r\n watch(() => props.modelValue, () => {\r\n internalValue.value = props.modelValue;\r\n });\r\n\r\n watch(internalValue, () => {\r\n emit(\"update:modelValue\", internalValue.value);\r\n });\r\n</script>\r\n"],"names":["internalValue","ref","props","modelValue","watch","value","emit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkDI,IAAA,IAAMA,aAAa,GAAGC,GAAG,CAACC,KAAK,CAACC,UAAU,CAAC,CAAA;MAE3CC,IAAAA,KAAK,CAAC,MAAMF,KAAK,CAACC,UAAU,EAAE,MAAM;MAChCH,MAAAA,aAAa,CAACK,KAAK,GAAGH,KAAK,CAACC,UAAU,CAAA;MAC1C,KAAC,CAAC,CAAA;UAEFC,KAAK,CAACJ,aAAa,EAAE,MAAM;MACvBM,MAAAA,IAAI,CAAC,mBAAmB,EAAEN,aAAa,CAACK,KAAK,CAAC,CAAA;MAClD,KAAC,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}