<template>
    <app-modal direction="right-top" height="100%" v-model:show="showModal">
        <app-address :show-radio="true" @change="onChange" />
    </app-modal>
</template>

<script lang="ts" setup>
import { computed } from 'vue'
import AppModal from '@/components/base/modal/index.vue'
import AppAddress from '@mobile/views/mine/address/Index.vue'

const props = defineProps({
    show: {
        type: Boolean,
        default: false
    }
})

const emit = defineEmits(['update:show', 'change'])

const showModal = computed({
    get: () => props.show,
    set: (val) => emit('update:show', val)
})

const onChange = (item: Model.UserReceiveInfoRsp) => {
    showModal.value = false
    emit('change', item)
}
</script>