{"version":3,"file":"checkBox.obs.js","sources":["../../../Framework/Controls/checkBox.obs"],"sourcesContent":["<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n    <RockFormField :modelValue=\"modelValue\"\n                   :label=\"label\"\n                   formGroupClasses=\"rock-check-box\"\n                   name=\"checkbox\">\n        <template #default=\"{ uniqueId, field }\">\n            <div class=\"control-wrapper\">\n                <div class=\"checkbox\">\n                    <label class=\"rock-checkbox-icon\">\n                        <input type=\"checkbox\" v-bind=\"field\" v-model=\"internalValue\" :id=\"uniqueId\" />\n                        <span class=\"label-text\">&nbsp;{{ text }}\n                            <slot name=\"textAppend\" />\n                        </span>\n                    </label>\n                </div>\n            </div>\n        </template>\n    </RockFormField>\n</template>\n\n<script setup lang=\"ts\">\n    import { PropType, ref, watch } from \"vue\";\n    import RockFormField from \"./rockFormField.obs\";\n\n    const props = defineProps({\n        modelValue: {\n            type: Boolean as PropType<boolean>,\n            required: true\n        },\n\n        label: {\n            type: String as PropType<string>,\n            required: true\n        },\n\n        rules: {\n            type: String as PropType<string>,\n            default: \"\"\n        },\n\n        text: {\n            type: String as PropType<string>,\n            default: \"\"\n        }\n    });\n\n    const emit = defineEmits<{\n        (e: \"update:modelValue\", value: boolean): void;\n    }>();\n\n    const internalValue = ref(props.modelValue);\n\n    watch(() => props.modelValue, () => {\n        internalValue.value = props.modelValue;\n    });\n\n    watch(internalValue, () => {\n        emit(\"update:modelValue\", internalValue.value);\n    });\n</script>\n"],"names":["props","__props","emit","__emit","internalValue","ref","modelValue","watch","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAyBI,IAAMA,KAAK,GAAGC,OAoBZ,CAAA;UAEF,IAAMC,IAAI,GAAGC,MAET,CAAA;MAEJ,IAAA,IAAMC,aAAa,GAAGC,GAAG,CAACL,KAAK,CAACM,UAAU,CAAC,CAAA;MAE3CC,IAAAA,KAAK,CAAC,MAAMP,KAAK,CAACM,UAAU,EAAE,MAAM;MAChCF,MAAAA,aAAa,CAACI,KAAK,GAAGR,KAAK,CAACM,UAAU,CAAA;MAC1C,KAAC,CAAC,CAAA;UAEFC,KAAK,CAACH,aAAa,EAAE,MAAM;MACvBF,MAAAA,IAAI,CAAC,mBAAmB,EAAEE,aAAa,CAACI,KAAK,CAAC,CAAA;MAClD,KAAC,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}