import { NButton } from 'naive-ui'
import GanttCom from '../Gantt'
import { useRouter } from 'vue-router'

export default defineComponent({
  setup() {
    const router = useRouter()

    const value = ref('day')

    const showView = () => {
      // getCheckboxState
      const checked = ganttInstance.taskListTableInstance?.getCheckboxState()
      console.log(checked)
    }

    return () => (
      <>
        <div class="flex gap-2">
          <NButton onClick={showView}>态势展示</NButton>
          <NButton
            onClick={() => {
              router.go(-1)
            }}
          >
            返回
          </NButton>
        </div>
        <GanttCom scale={value.value} />
      </>
    )
  },
})
