import { defineStore } from 'pinia';
import { ref } from 'vue'

export const useServerStore = defineStore('server', () => {
  const tmp_ip = "http://192.168.10.116:80"
  const server_ip = ref("localhost")
  const server_port = ref(":7896")
  const api_dewarp = ref(tmp_ip + "/v1/image_process/dewarp")
  const api_version = ref(tmp_ip + "/v1/version")
  const api_build_tag = ref(tmp_ip + "/v1/buildTag")
  const api_model_info = ref(tmp_ip + "/v1/modelInfo")
  const api_magic_color = ref(tmp_ip + "/v1/image_process/magic_color")
  const api_ocr = ref(tmp_ip + "/v1/ocr")
  const api_table_rec = ref(tmp_ip + "/v1/table_rec")
  const api_layout_analysis = ref(tmp_ip + "/v1/detection/layout_parser")
  const api_stamp_detection = ref(tmp_ip + "/v1/detection/detection_stamp")
  const api_pdf_to_word = ref(tmp_ip + "/v1/convert/pdf2word")
  const api_download = ref(tmp_ip + "/download")

  return { server_ip, server_port, api_dewarp, api_layout_analysis, api_magic_color, api_pdf_to_word,
           api_ocr, api_stamp_detection, api_table_rec, api_build_tag, api_model_info, api_version,
           api_download }
})