import {iSayHello} from './types'

export function sayHello({firstName, lastName, age}: iSayHello) {
  console.log('Hello, world!')
  console.log(`You first name is ${firstName}`)
  if (lastName) {
    console.log(`Your last name is ${lastName}`)
  }
  if (age) {
    console.log(`You are ${age} years old`)
  }
  return `Hello, ${firstName} ${lastName}! You are ${age} years old.`;
}

const Man = { sayHello }

export default Man