<template>
    <view class="fx-row fx-cen-cen gap-3">
        <uv-checkbox-group class="!flex-none" @change="$emit('update:modelValue', !!$event.length)">
            <uv-checkbox :checked="modelValue" activeColor="var(--primary-deep-color)"/>
        </uv-checkbox-group>
        <view class="fx-row gap-5">
            <text @click="$emit('update:modelValue', !modelValue)">我已阅读并同意</text>
            <text class="text-primary underline" @click="transferToProtocolUser">服务协议</text>
            <text>和</text>
            <text class="text-primary underline" @click="transferToProtocolPrivacy">隐私政策</text>
        </view>
    </view>
</template>

<script setup>

import {useTransfer} from "@/hooks/useTransfer";

defineProps({
    modelValue: {
        type: Boolean,
        default: false
    }
})
defineEmits(['update:modelValue'])

const {transferToProtocolPrivacy, transferToProtocolUser} = useTransfer()
</script>

<style scoped>

</style>