import { Plugin } from '../PluginsRegistry' ; const extendsPlugin = ( { addDependency } , style ) => { if ( style . hasOwnProperty ( 'extends' ) ) { let dependencies = style [ 'extends' ] ; if ( typeof dependencies === 'function' ) { dependencies = dependencies ( ) ; } if ( ! Array . isArray ( dependencies ) ) { dependencies = [ dependencies ] ; } dependencies . forEach ( ( dep ) => addDependency ( dep ) ) ; delete style [ 'extends' ] ; } } ; export default extendsPlugin ;