<script setup>
import { storeToRefs } from 'pinia'

import { useConfigStore } from '@/stores/config'
const config_store = useConfigStore()
const { conf } = storeToRefs(config_store)

const mobile = inject('mobile')
</script>

<template>
  <n-card>
    <template #header>
      <n-checkbox v-model:checked="conf.maa_enable">
        <div class="card-title">日常任务</div>
      </n-checkbox>
      <help-text>
        <div>刷理智周计划、每日/每周任务、信用作战</div>
      </help-text>
    </template>
    <n-form
      :label-placement="mobile ? 'top' : 'left'"
      :show-feedback="false"
      label-width="100"
      label-align="left"
    >
      <n-form-item>
        <template #label>
          <span>任务间隔</span>
          <help-text>
            <div>可填小数</div>
            <div>清理智、日常/周常任务领取、借助战打OF-1</div>
          </help-text>
        </template>
        <n-input-number v-model:value="conf.maa_gap">
          <template #suffix>小时</template>
        </n-input-number>
      </n-form-item>
    </n-form>
  </n-card>
</template>
