import {
    InjectionKey,
    Ref,
    ComputedRef,
    ComponentInternalInstance,
    ComponentPublicInstance
} from 'vue'

export interface OrderGoodProp {
    goodsId: number
    goodsName: string
    goodsNum: number
    goodsPrice: number
    goodsSnap: ''
    id: number
    imageUrl: string
    orderId: number
    totalPayPrice: number
    totalPrice: number
    unitName: string
}
export interface OrderDetailProps {
    orderGoods: OrderGoodProp
    id: number
    orderGoodsDetailVo: OrderGoodProp
    appointTime: string
    appointTimeEnd: string
    appointTimeStart: string
    weekDay: string
    orderStatus: number
    goodsPrice: number
    appointTimeStartStr: string
    appointTimeEndStr: string
    createTime: string
    city: string
    district: string
    address: string
    mobile: string
    totalNum: number
    finishTime: string
    totalAmount: number
    orderAmount: number
    province: string
    cancelTime: string
    contact: string
    sn: number
    userRemark: string
    staff: null | any
    longitude: string
    latitude: string
    desensitizationMobile: string
    projectCost: number
    staffId: number
    goodsName: string
    status: number
}

interface OrderContext {
    orderDetail: OrderDetailProps | Ref<OrderDetailProps>
    refresh: (params?: any) => void
    field: string
    openModal: () => void
    openAuditModal: () => void
    popupShow: Ref<boolean>
}
interface AuthStatusContext {
    authStatus: ComputedRef<number>
}
export const ORDER_INJECTION_KEY: InjectionKey<OrderContext> = Symbol()
export const AUTH_STATUS_INJECTION_KEY: InjectionKey<AuthStatusContext> = Symbol()

interface IProxy extends ComponentPublicInstance {
    children: ComponentInternalInstance[]
}
export interface FormInstance extends ComponentInternalInstance {
    proxy: IProxy
}
export const FORM_KEY: InjectionKey<FormInstance> = Symbol()
