import chalk from 'chalk';
import path from 'path';
const capitalize = (s) => s.replace(/./, c => c.toUpperCase());
const logDirectoryCopied = (directory, destination) => {
  console.log(`Directory ${chalk.yellow(path.basename(directory.toString()))} successfully ${chalk.blue('copied')} in ${chalk.yellow(path.basename(destination.toString()))}`);
};
const logDirectoryCreated = (directory, destination) => {
  console.log(`Directory ${chalk.yellow(path.basename(directory.toString()))} successfully ${chalk.green('created')} ${destination ? 'in ' + chalk.yellow(path.basename(destination.toString())) : ''}`);
};
const logDirectoryDeleted = (directory) => {
  console.log(`Directory ${chalk.yellow(path.basename(directory.toString()))} successfully ${chalk.red('deleted')} ${chalk.gray('(or skipped if missing)')}`);
};
const logFileSavedTo = (file, destination) => {
  console.log(`File ${chalk.yellow(path.basename(file.toString().trim()))} successfully ${chalk.green('saved')} ${destination ? 'in ' + chalk.yellow(path.basename(destination.toString().trim())) : ''}`);
};
const logFileDeleted = (file, destination) => {
  console.log(`File ${chalk.yellow(path.basename(file.toString().trim()))} successfully ${chalk.green('deleted')} ${destination ? 'in ' + chalk.yellow(path.basename(destination.toString().trim())) : ''}`);
};
const logFileActionDone = (args) => {
  console.log(`${capitalize(args.entity.trim())}${args.source ? ' ' + chalk.yellow(path.basename(args.source.toString().trim())) : ''} successfully ${chalk.blue(args.actionDone.trim())} ${args.destination ? `as ${chalk.yellow(path.basename(args.destination.toString().trim()))}` : ''}`);
};
const logStatus = (args) => {
  console.log(`${capitalize(args.actionDoing)} if ${args.subject ? chalk.yellow(args.subject) : ''} ${args.status ? args.status : ''} ${args.match ? chalk.yellow(args.match) : ''}`);
};
export { logDirectoryCopied, logDirectoryCreated, logDirectoryDeleted, logFileActionDone, logStatus, logFileSavedTo, logFileDeleted, };
