import FileSet from './FileSet' ; import Target from '../Target' ; import { ComponentGeneratorOptions , Content } from '../../types' ; export default class ComponentCodeGenerator { public renderDependency ( libraryName , types , options ) { let defaultType = null ; const deconstructedTypes = [ ] ; if ( Array . isArray ( types ) && types . length > 0 ) { types . map ( ( type ) => { if ( typeof type === 'string' ) { deconstructedTypes . push ( type ) ; } else { if ( type . defaultImport ) { defaultType = type . type ; } else { deconstructedTypes . push ( type . type ) ; } } } ) ; } const importArray = [ ] ; if ( defaultType ) importArray . push ( defaultType ) ; if ( deconstructedTypes . length > 0 ) { importArray . push ( `{ ${ deconstructedTypes . join ( ', ' ) } }` ) ; } return `import ${ importArray . join ( ', ' ) } from '${ libraryName }'` ; } public render ( name , content , dependencies , styles , props , target , options ? ) { return null ; } }