import { ConfigPlugin, createRunOncePlugin } from '@expo/config-plugins';
import { withNetcoreAndroid } from './withSmartechBaseAndroid';
import { withNetcoreiOS } from './withSmartechBaseiOS';
import { SmartechBaseProps } from './smartechBaseProps';
import { validateSmartechProps } from './validateSmartechBaseProps';

const withSmartechBase: ConfigPlugin<SmartechBaseProps> = (config, props) => {
    validateSmartechProps(props);
    config = withNetcoreiOS(config, props);
    config = withNetcoreAndroid(config, props);
    return config;
}

module.exports = withSmartechBase;
const pkg = require("../package.json");
export default createRunOncePlugin(withSmartechBase, pkg.name, pkg.version);