import uuid from 'uuid/v4' ; import { IFolder } from './types' ; import { IFilePathItem } from '../file' ; import { IUser } from '../user' ; import { createEmptyIUser } from '../user/user' ; export const createFolderPayload = ( path = [ ] , props = { } , user = createEmptyIUser ( '' ) ) : IFolder => ( { id : uuid ( ) , name : `New folder` , path , files : [ ] , isLiked : false , owner : user . id , ownerDetails : user , dateCreated : Date . now ( ) , dateUpdated : Date . now ( ) , ... props } ) ;