import path from 'path';
import { isReproducible } from '../../base/support/index.mjs';
const getDefaultName = generator => {
    const defaultName = 'begcode';
    if (generator && isReproducible(generator)) {
        return defaultName;
    }
    return /^[a-zA-Z0-9_-]+$/.test(path.basename(process.cwd()))
        ? path.basename(process.cwd()).replace('generator-begcode-', '')
        : defaultName;
};
export default getDefaultName;
