import { NRadioButton, NRadioGroup, NStep } from 'naive-ui' import { computed, defineComponent, toRef } from 'vue' import { currentConfig } from '~/core/config.ts' import type { notebook } from '~/core/siyuan_type.ts' export default defineComponent({ props: { notebooks: { type: Array as () => notebook[], required: true, }, }, setup(props) { const value = computed({ get: () => currentConfig.value.notebook.id, set: (id: string) => { Object.assign( currentConfig.value.notebook, props.notebooks.find((book) => book.id === id), ) }, }) const notebooks = toRef(props, 'notebooks') return { value, notebooks, } }, render() { return ( {this.notebooks.map((book) => ( ))} ) }, })