<?php

namespace App\View\Components;

use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class ToggleStatus extends Component
{
    public $id;
    public $hidden;
    public $label;
    public $buttonClass;
    public $enableText;
    public $disableText;
    public $condition;

    public function __construct(
        $id = null,
        $hidden = false,
        $label = 'Toggle Status',
        $buttonClass = 'btn-success',
        $enableText = 'Enable',
        $disableText = 'Disable',
        $condition = true
    ) {
        $this->id = $id;
        $this->hidden = $hidden;
        $this->label = $label;
        $this->buttonClass = $buttonClass;
        $this->enableText = $enableText;
        $this->disableText = $disableText;
        $this->condition = $condition;
    }

    public function render(): View|Closure|string
    {
        return view('components.toggle-status');
    }
}
