#!/usr/bin/env node
//const lower = require("./logic"); // impport function
const {addContact, getContact} = require("./logic"); 

//console.log(lower.toLower("PATIPHAN MARAK"));

const program = require('commander');

program
    .version('0.1.0')
    .description('Contact management system');

program
    .command('addContact <firstame> <lastname> <phone> <email>')
    .alias('a')
    .description('Add a contact')
    .action((firstname, lastname, phone, email) => {
        //addContact({ firstname, lastname, phone, email });
        console.log(`User : ${firstname} ${lastname} ${phone} ${email} `);
    });

program
    .command('programmer')
    .alias('p')
    .description('programmer')
    .action(() => {
        console.log('Programmer is Yiw');
    });

console.log(process.argv);
//program.parse(process.argv); // พาสคำสั่ง