import { logger } from '@zenview/micro-utils';

export const getMicroConfig = (appConfig = {}, appProps, container) => {
  const { name, script, entry } = appConfig;
  if (!name) {
    return;
  }
  const microAppEntry = entry ? entry : { scripts: [script], styles: undefined, html: `<div id="${name}" style="height:100%"></div>` };

  return {
    name,
    container,
    props: appProps,
    entry: microAppEntry,
  };
};
