<?php

class BasketAsia
{
    /**
     * A little intro about "Who We Are"
     * @return string
     */
    public function whoWeAre(): string
    {
        return "
            Founded in 2004, we have developed and deployed variety of solutions,
            including Communication and Telemetry solutions in recent years.
            and currently focusing on Personal Messaging and communication
            applications that also integrate crypto currency and
            blockchain technology.

            We also extensive exposure to accounting and business
            management tools.
        ";
    }

    /**
     * Person[]
     */
    public array $teamMembers;

    /*
     * We know this has to be on top, but here we made an exception.
     */
    public function __construct()
    {
        $this->teamMembers = [
            new Person("Amir", "PHP Developer"),
            new Person("Behnam", "Full Stack Developer (PHP, C#, React)"),
            new Person("Hadi", "Accountant"),
            new Person("Hoda", "PHP, C# Developer"),
            new Person("Jafar", "Technical Consultant"),
            new Person("Janine", "Business Advisor"),
            new Person("Jeffrey", "EU Marketing Director"),
            new Person("Mohammad.A", "Customer Service and Technical Support"),
            new Person("Mohammad.N", "Team Leader"),
            new Person("Yazdan", "General Manager (Kuala Lumpur)"),
            new Person("Yuri", "Dev-Ops"),
            new Person("Zahra", "C# Developer"),
        ];
    }

    /**
     * You can call this method if you are interested to join us.
     */
    public function addMember(Person $person)
    {
        array_push($this->teamMembers, $person);
    }

    /**
     * We have three core principles in our development stages in mind
     * @return string[]
     */
    public function ourCodingApproaches(): array
    {
        return [
            "DDD" => "Domain Driven Design",
            "BDD" => "Behavior Driven Design",
            "TDD" => "Test Driven Design",
        ];
    }

    /**
     * We try to describe the type(Person) that we are looking for.
     * @return Person
     */
    public function whatWeAreLookingFor(): Person
    {
        return new Person("
            We are looking for an open-minded with an international mindset who does not
            mind to learn the latest technology and is more productive when it comes
            to teamwork. of course, having extensive experience in production
            the environment would be a benefit to our team, but don't be shy to
            hit the submit a resume if you do not possess all of the
            requirements or skills.

            Experienced talents in the area of web platforms, web architectures,
            coding standard, databases, and mobile apps.
            Multiple vacancies are available including a Senior PHP Developer
            who will take a key role on our team and must have knowledge in
            all stages of software development.
        ", "Senior PHP Developer");
    }


    /**
     * @return Requirement[]
     */
    public function Requirements(): array
    {
        return [
            new Requirement("PHP Fluency"),
            new Requirement("Laravel framework"),
            new Requirement("MySQL"),
            new Requirement("HTML & CSS"),
            new Requirement("Git command lines"),
            new Requirement("Composer packaging"),
        ];
    }

    /**
     * Would be a plus.
     *
     * @return BonusPoint[]
     */
    public function bonusPoints(): array
    {
        return [
            new BonusPoint("Linux"),
            new BonusPoint("Docker"),
            new BonusPoint("Kubernetes"),
            new BonusPoint("Apache"),
            new BonusPoint("NGINX"),
            new BonusPoint("NoSQL databases like Mongo & Redis"),
            new BonusPoint("Experience with JavaScript and one of its popular frameworks"),
        ];
    }

    /**
     * @return Personality[]
     */
    public function getRequiredPersonalities(): array
    {
        return [
            new Personality("Ability to work well in a team structure"),
            new Personality("Passion for best design and coding practices"),
            new Personality("Desire to develop new bold ideas"),
        ];
    }

    /**
     * @return Expectation[]
     */
    public function expectations(): array
    {
        return [
            new Expectation("Great interest in exploring new technology"),
            new Expectation("Resourcefulness and troubleshooting attitude"),
            new Expectation("Demonstrated attention to detail, 'GO-GETTER' attitude"),
            new Expectation("Ability to effectively plan and manage simultaneous projects and tasks"),
            new Expectation("Strong work ethic"),
        ];
    }

    /**
     * @return Benefit[]
     */
    public function benefits(): array
    {
        return [
            new Benefit("Possible relocation and migration"),
            new Benefit("Working with multi-national partners"),
            new Benefit("Flexible work hours"),
            new Benefit("Remote Working (beyond pandemic restrictions)"),
            new Benefit("Paid Maternity/Paternity leave."),
            new Benefit("Possible equity based on work performance, commitment upon project tokenization."),
        ];
    }

    /**
     * We can't give definitive salary amount since it is based on your performance,
     * code quality and mindset.
     *
     * @param int $performance
     * @param int $codeQuality
     * @param MindSet $mindSet
     * @return Salary
     */
    public function salary(int $performance, int $codeQuality, MindSet $mindSet): Salary
    {
        return SalaryFactory::make($performance, $codeQuality, $mindSet);
    }

    /**
     * @return string
     */
    public function moreInfo(): string
    {
        return "
            This is a full-time position open to anyone located in any city
            inside Iran and does not require relocation.
            We’re a fully remote organization and our culture
            is highly tuned towards remote working.

            We look forward to talking with you!
        ";
    }
}

/*
* Salary is commensurate with experience.
* This is a full-time, salaried position
* with a competitive benefits package.
*/

class SalaryFactory
{
    public static function make(int $performance, int $codeQuality, MindSet $mindSet): Salary
    {
        // Todo: IMPLEMENT CALCULATION
        throw new NotImplementedException();
    }
}

class Person
{
    public function __construct(
        public string $name,
        public string $title
    )
    {
    }
}

class Salary
{
    public static string $currency = "IRR";
    public function __construct(
        public int $amount
    )
    {
    }
}

class MindSet
{
    // Todo: implement enum
}

class Requirement
{
    public function __construct(
        public string $title
    )
    {
    }
}

class BonusPoint
{
    public function __construct(
        public string $title
    )
    {
    }
}

class Personality
{
    public function __construct(
        public string $title
    )
    {
    }
}

class Expectation
{
    public function __construct(
        public string $title
    )
    {
    }
}