<?php

namespace App\Traits;

trait Description
{

    public function description() :?string
    {
        return $this->getAttribute("description_" . str_replace('_', '-', app()->getLocale())) ?? $this->getAttribute('description');
    }

    public function description1() :?string
    {
        return $this->getAttribute("description1_" . str_replace('_', '-', app()->getLocale())) ?? $this->getAttribute('description1');
    }

    public function description2() :?string
    {
        return $this->getAttribute("description2_" . str_replace('_', '-', app()->getLocale())) ?? $this->getAttribute('description2');
    }

    public function description3() :?string
    {
        return $this->getAttribute("description3_" . str_replace('_', '-', app()->getLocale())) ?? $this->getAttribute('description3');
    }

    public function description4() :?string
    {
        return $this->getAttribute("description4_" . str_replace('_', '-', app()->getLocale())) ?? $this->getAttribute('description4');
    }

    public function description5() :?string
    {
        return $this->getAttribute("description5_" . str_replace('_', '-', app()->getLocale())) ?? $this->getAttribute('description5');
    }

    public function condition() :?string
    {
        return $this->getAttribute("condition_" . str_replace('_', '-', app()->getLocale())) ?? $this->getAttribute('condition');
    }
}
