import { ResolvePsdToSliderHandler,ResolvePsdDrawingBoardSize, ResolveThumbHandler,ResolveSliderFonts } from "./resolve"

export const toSlider = async (psd:any)=>{
    const sliders = await ResolvePsdToSliderHandler(psd);
    return sliders
}
export const getDrawingBoardSize= (psd:any) => {
    return ResolvePsdDrawingBoardSize(psd)
}
export const getFonts = (psd:any) => {
    let fonts = ResolveSliderFonts(psd)
    let result:any[] = []
    if(fonts && fonts.length>0){
        fonts.forEach(x=>{
            result.push({
                fontFamily:x,
                uploadType:0
            })
        })
    }
    return result
}
export const toThumbnails = async (psd:any)=>{
    const thumbs = await ResolveThumbHandler(psd);
    return thumbs
}