<?php

namespace App\View\Components;

use Illuminate\View\Component;

class StatCard extends Component
{
    public $title;
    public $value;
    public $prefix;
    public $change;
    public $changeType;
    public $icon;
    public $iconBg;
    public $gradient;
    public $href;

    public function __construct(
        $title = null,
        $value = 0,
        $prefix = '৳',
        $change = null,
        $changeType = 'up',
        $icon = null,
        $iconBg = 'primary',
        $gradient = false,
        $href = null
    ) {
        $this->title = $title;
        $this->value = $value;
        $this->prefix = $prefix;
        $this->change = $change;
        $this->changeType = $changeType;
        $this->icon = $icon;
        $this->iconBg = $iconBg;
        $this->gradient = $gradient;
        $this->href = $href;
    }

    public function render()
    {
        return view('components.stat-card');
    }
}
