<?php

namespace Aura\TextBlocks\Resources;

use Eminiarts\Aura\Models\Post;

use Eminiarts\Aura\Resource;

class TextBlock extends Resource
{
    public static string $type = 'TextBlock';

    public static ?string $slug = 'textblock';

    protected static ?int $sort = 0;

    protected static ?string $group = 'Plugins';


    public static function getWidgets(): array
    {
        return [];
    }

    public function getIcon()
    {
        return '<svg class="w-5 h-5" viewBox="0 0 18 18" fill="none" stroke="currentColor" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.75 9a6.75 6.75 0 1 1-13.5 0 6.75 6.75 0 0 1 13.5 0Z" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>';
    }

    public static function getFields()
    {
        return [
            [
                'type' => 'Eminiarts\\Aura\\Fields\\Panel',
                'name' => 'Template',
                'slug' => 'tab-template',
                'global' => true,
            ],
            // [
            //     'name' => 'Name',
            //     'type' => 'Eminiarts\\Aura\\Fields\\Text',
            //     'validation' => 'required',
            //     'on_index' => true,
            //     'on_view' => true,
            //     'on_forms' => true,
            //     'slug' => 'name',
            // ],
            [
                'name' => 'Identifier',
                'type' => 'Eminiarts\\Aura\\Fields\\Text',
                'validation' => 'required',
                'on_index' => true,
                'on_view' => true,
                'on_forms' => true,
                'slug' => 'identifier',
            ],
            // [
            //     'name' => 'Description',
            //     'type' => 'Eminiarts\\Aura\\Fields\\Textarea',
            //     'validation' => '',
            //     'on_index' => false,
            //     'on_view' => true,
            //     'on_forms' => true,
            //     'slug' => 'description',
            // ],
            [
                'name' => 'Template Body',
                'type' => 'Eminiarts\\Aura\\Fields\\Textarea',
                'validation' => 'required',
                'on_index' => false,
                'on_view' => true,
                'on_forms' => true,
                'slug' => 'template_body',
            ],
            // [
            //     'name' => 'Placeholders',
            //     'type' => 'Eminiarts\\Aura\\Fields\\Repeater',
            //     'validation' => '',
            //     'on_index' => false,
            //     'on_view' => true,
            //     'on_forms' => true,
            //     'slug' => 'placeholders',
            // ],
            // [
            //     'name' => 'Key',
            //     'type' => 'Eminiarts\\Aura\\Fields\\Text',
            //     'validation' => '',
            //     'on_index' => true,
            //     'on_view' => true,
            //     'on_forms' => true,
            //     'slug' => 'key',
            //     'style' => [
            //         'width' => '50'
            //     ]
            // ],
            // [
            //     'name' => 'Value',
            //     'type' => 'Eminiarts\\Aura\\Fields\\Text',
            //     'validation' => '',
            //     'on_index' => true,
            //     'on_view' => true,
            //     'on_forms' => true,
            //     'slug' => 'value',
            //     'style' => [
            //         'width' => '50'
            //     ]
            // ],
        ];
    }
}
