import { RouteRecordRaw } from "vue-router";

export const publicRoutes:RouteRecordRaw[] = [
  {
    path: "/home",
    name: "home",
    meta: {
      title: "康乐云家",
    },
    components: {
      default: () => import("../views/home/index.vue"),
      tabbar: () => import("../components/tabbar/index.vue")
    },
  },
  {
    path: "/location/map",
    name: "map",
    meta: {
      title: "新增地址",
    },
    components: {default:() => import("../views/location/map.vue"),backButton:() => import("../components/back-button/index.vue")},
  },
  {
    path: "/location/administrative",
    name: "administrative",
    meta: {
      title: "选择城市",
    },
    components: {default:() => import("../views/location/administrative.vue")},
  },
  {
    path: "/medical",
    name: "medical",
    meta: {
      title: "康乐云家",
    },
    components: {
        default: () => import("../views/medical/index.vue"),
        tabbar: () => import("../components/tabbar/index.vue")
    },
  },
  {
    path: "/shop",
    name: "shop",
    meta: {
      title: "康乐云家",
    },
    components: {
        default: () => import("../views/shop/index.vue"),
        tabbar: () => import("../components/tabbar/index.vue")
    },
  },
  {
    path: "/shop/product",
    name: "product",
    meta: {
      title: "商品详情",
    },
    components: {default:() => import("../views/shop/productInfo.vue"),tabbar: () => import("../components/back-button/index.vue")},
  },
  {
    path: "/checkout",
    name: "checkout",
    meta: {
      title: "确认订单",
    },
    components: {default:() => import("../views/checkout/index.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path: "/checkout/payment",
    name: "payment",
    meta: {
      title: "支付成功",
    },
    component: () => import("../views/checkout/payment.vue"),
  },
  {
    path:"/checkout/health-care",
    name:"health-care-checkout",
    meta:{
      title:"确认订单"
    },
    components:{default:() => import("../views/checkout/healthCare.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:"/housekeeping/order/:id",
    name:"housekeeping-checkout",
    meta:{
      title:"确认订单"
    },
    components:{default:() => import("../views/housekeeping/order.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },

  {
    path: "/mine",
    name: "mine",
    meta: {
      title: "康乐云家",
    },
    components: {
        default: () => import("../views/mine/index.vue"),
        tabbar: () => import("../components/tabbar/index.vue")
    },
  },
  {
    path:'/mine/address',
    name:'my-address',
    meta:{
      title:'收获地址管理'
    },
    component: () => import("../views/mine/addressManagement.vue")
  },
  {
    path:'/mine/add/address',
    name:'add-address',
    meta:{
      title:'收获地址管理'
    },
    component: () => import("../views/mine/addAddress.vue")
  },
  {
    path:'/mine/add/paramedic',
    name:'add-paramedic',
    meta:{
      title:'新增被护理人'
    },
    component: () => import("../views/mine/addParamedic.vue")
  },
  {
    path:'/mine/notice',
    name:'notice',
    meta:{
      title:'消息中心'
    },
    components: {default:() => import("../views/mine/notice.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:'/mine/orders',
    name:"mine-orders",
    meta:{
      title:'我的订单'
    },
    components: {default:() => import("../views/mine/orders.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:'/mine/user-info',
    name:'mine-user-info',
    meta:{
      title:'个人资料'
    },
    component: () => import("../views/mine/userInfo.vue")
  },
  {
    path:'/restaurant',
    name:'restaurant',
    meta:{
      title:'社区点餐'
    },
    components: {default:() => import("../views/restaurant/index.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:"/restaurant/detail/:id",
    name:"restaurant-detail",
    meta:{
      title:"商品详情"
    },
    components: {default:() => import("../views/restaurant/detail.vue"),backButton:() => import("../components/back-button/index.vue")}
  },
  {
    path:'/courses',
    name:'courses',
    meta:{
      title:'课程学习'
    },
    components: {default:() => import("../views/courses/index.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:'/courses/detail/:id',
    name:'courses-detail',
    meta:{
      title:'课程详情'
    },
    components: {default:() => import("../views/courses/detail.vue"),backButton:() => import("../components/back-button/index.vue")}
  },
  {
    path:'/courses/cart/:id',
    name:'courses-cart',
    meta:{
      title:'购买课程'
    },
    component: () => import("../views/courses/courseCart.vue")
  },
  {
    path:'/travel',
    name:'travel',
    meta:{
      title:'乐享夕阳行'
    },
    components: {default:() => import("../views/travel/index.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:'/health-care',
    name:'health-care',
    meta:{
      title:'康养护理'
    },
    components: {default:() => import("../views/healthCare/index.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:'/health-care/order/:id',
    name:'health-care-order',
    meta:{
      title:'预约'
    },
    components: {default:() => import("../views/healthCare/order.vue"),backButton:() => import("../components/back-button/index.vue")},
  },
  {
    path:'/jinze',
    name:'jinze',
    meta:{
      title:'锦泽安康'
    },
    components: {default:() => import("../views/jinze/index.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:'/jinze/detail/:id',
    name:'jinze-detail',
    meta:{
      title:'养老院详情'
    },
    components: {default:() => import("../views/jinze/detail.vue"),backButton:() => import("../components/back-button/index.vue")},
  },
  {
    path:'/jinze/images/:id',
    name:'jinze-images',
    meta:{
      title:'泰康之家·锦绣府'
    },
    components: {default:() => import("../views/jinze/images.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:'/jinze/patient-situation',
    name:'jinze-patient-situation',
    meta:{
      title:'情况描述'
    },
    component: () => import("../views/jinze/patientSituation.vue")
  },
  {
    path:'/home/address',
    name:'current-address',
    meta:{
      title:'选择定位'
    },
    component: () => import("../views/home/currentLocation.vue")
  },
  {
    path:'/housekeeping',
    name:'housekeeping',
    meta:{
      title:'预约家政'
    },
    components: {default:() => import("../views/housekeeping/index.vue"),backButton:() => import("../components/back-button/index.vue")},
    props:{
      backButton:{bottom:"15vh"}
    }
  },
  {
    path:"/housekeeping/detail/:id",
    name:"housekeeping-detail",
    meta:{
      title:"家政详情"
    },
    components: {default:() => import("../views/housekeeping/detail.vue"),backButton:() => import("../components/back-button/index.vue")},
  },
  {
    path:'/decoration',
    name:'decoration',
    meta:{
      title:'装饰'
    },
    component: () => import("../views/decoration/index.vue")
  },
  {
    path: "/unauthorized",
    name: "unauthorized",
    meta: {
      title: "unauthorized",
    },
    component: () => import("../views/unauthorized.vue"),
  },
];
