import type { ExtractPropTypes } from 'vue'
import type { transferProps, $constants } from '@/transfer/src'
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type'
import type {
getObj,
getSourceData,
getLeftCheckedData,
getRightCheckedData,
getTargetData,
logicFun,
onSourceCheckedChange,
onTargetCheckedChange,
addToLeft,
addToRight,
clearQuery,
sortableEvent
} from '../src/transfer'
export interface ITransferData {
key: string
label: string
disabled: boolean
[customProp: string]: any
}
export interface ITransferState {
leftChecked: string[]
rightChecked: string[]
leftData: any[]
rightData: any[]
dataObj: any
sourceData: ITransferData[]
targetData: ITransferData[]
hasButtonTexts: boolean
isToLeft: boolean
optionRender: any
}
export type ITransferProps = ExtractPropTypes<typeof transferProps>
export type ITransferConstants = typeof $constants
export type ITransferRenderlessParams = ISharedRenderlessFunctionParams<ITransferConstants> & {
api: ITransferApi
state: ITransferState
props: ITransferProps
}
export interface ITransferApi {
state: ITransferState
getObj: ReturnType<typeof getObj>
clearQuery: ReturnType<typeof clearQuery>
getSourceData: ReturnType<typeof getSourceData>
addToLeft: ReturnType<typeof addToLeft>
getLeftCheckedData: ReturnType<typeof getLeftCheckedData>
getRightCheckedData: ReturnType<typeof getRightCheckedData>
addToRight: ReturnType<typeof addToRight>
onTargetCheckedChange: ReturnType<typeof onTargetCheckedChange>
onSourceCheckedChange: ReturnType<typeof onSourceCheckedChange>
logicFun: ReturnType<typeof logicFun>
getTargetData: ReturnType<typeof getTargetData>
sortableEvent: ReturnType<typeof sortableEvent>
}
export type ITransferRenderlessParamUtils = ISharedRenderlessParamUtils<ITransferConstants>