<script setup>
import {reactive} from 'vue';

const form = reactive({
    isSuggestion: 1,
    suggestion: 0,
});

const success = () => {
    return form;
}

defineExpose({
    success,
});
</script>

<template>
    <a-form layout="vertical" :model="form">
        <a-form-item label="是否提供修改建议">
            <a-radio-group v-model:model-value="form.isSuggestion">
                <a-radio :value="1">是</a-radio>
                <a-radio :value="0">否（拒绝达人本次回填，也无需达人进行后续的回填）</a-radio>
            </a-radio-group>
        </a-form-item>

        <template v-if="form.isSuggestion===1">
            <a-form-item label="修改建议">
                <div class="w-full">
                    <a-radio-group v-model:model-value="form.suggestion" direction="vertical">
                        <a-radio :value="0">请截图账号主页截图，证明发布了该素材</a-radio>
                        <a-radio :value="1">请删除后，按要求重新发布素材</a-radio>
                        <a-radio :value="2">请删除现有评论，按要求重新发布评论</a-radio>
                        <a-radio :value="3">其他</a-radio>
                    </a-radio-group>

                    <div v-if="form.suggestion === 3">
                        <a-textarea
                            :auto-size="{minRows: 3}"
                            placeholder="在此输入拒绝的原因，方便达人理解">
                        </a-textarea>
                        <a-upload>
                        </a-upload>
                    </div>
                </div>
            </a-form-item>

            <a-form-item label="*是否要求达人重新回填当前《回填数据1》">
                <a-radio-group>
                    <a-radio>
                        是&nbsp;&nbsp;&nbsp;请最晚于
                        <a-date-picker
                            format="YYYY-MM-DD HH:mm:ss"
                            show-time>
                        </a-date-picker>
                        之前，完成重新回填
                    </a-radio>
                    <div class="info ml-[30px] mb-[15px]">如果给达人提供的修改建议导致回填数据有变动，请点击此项</div>
                    <a-radio>
                        <div class="flex whitespace-nowrap items-center gap-[4px]">
                            否&nbsp;&nbsp;&nbsp;请最晚于
                            <a-date-picker
                                format="YYYY-MM-DD HH:mm:ss"
                                show-time>
                            </a-date-picker>
                            之前，在我的回填中回复
                            <a-input class="w-auto" placeholder="请输入"></a-input>
                        </div>
                    </a-radio>
                </a-radio-group>
            </a-form-item>
        </template>
    </a-form>
</template>

<style lang="scss" scoped>
.info {
    color: rgb(134, 144, 156);
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0;
    text-align: left;
}
</style>
