<?php

namespace App\View\Components\Controls;

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

class TiptapEditor extends Component
{
    public string $name;
    public string $value;
    public string $placeholder;

    public function __construct(string $name = 'content', string $value = '', string $placeholder = 'Escribe aquí…')
    {
        $this->name = $name;
        $this->value = $value;
        $this->placeholder = $placeholder;
    }

    public function render(): View|Closure|string
    {
        return view('components.controls.tiptap-editor');
    }
}