<?php

namespace App\View\Components;

use Illuminate\View\Component;

class IdentityPeople extends Component
{
    public $people;
    public $action;
    public $id;
    public $name;
    public $bloodTypes;
    public $new;
    public $patientId;

    /**
     * Create a new component instance.
     *
     * @return void
     */
    public function __construct($people,$bloodTypes,$action,$id,$name,$patientId,$new=true)
    {
        $this->people          = $people;
        $this->action          = $action;
        $this->bloodTypes      = $bloodTypes;
        $this->id              = $id;
        $this->name            = $name;
        $this->new             = $new;
        $this->patientId = $patientId;
    }

    /**
     * Get the view / contents that represent the component.
     *
     * @return \Illuminate\Contracts\View\View|\Closure|string
     */
    public function render()
    {
        return view('components.identity-people',[
            "patient"=>$this->people,
            "action"=>$this->action,
            "id"=>$this->id,
            "name"=>$this->name,
            "new"=>$this->new,
            "patientId"=>$this->patientId
        ]);
    }
}
