<?php

use Spatie\LaravelSettings\Migrations\SettingsMigration;

class Add{pascal}ToolSettings extends SettingsMigration
{
    public function up(): void
    {
        $this->migrator->add('tool-{dash}.enabled', TRUE);
        $this->migrator->add('tool-{dash}.title', '{title}');
        $this->migrator->add('tool-{dash}.summary', '{summary}');
        $this->migrator->add('tool-{dash}.description', '{description}');

        $this->migrator->add("tool-{dash}.metaDescription", "{summary}");
        $this->migrator->add("tool-{dash}.metaKeywords", "");

        $this->migrator->add('tool-slugs.{pascal}', '{dash}');
    }

    public function down() : void
    {
        $this->migrator->delete('tool-{dash}.enabled');
        $this->migrator->delete('tool-{dash}.title');
        $this->migrator->delete('tool-{dash}.summary');
        $this->migrator->delete('tool-{dash}.description');

        $this->migrator->delete('tool-{dash}.metaDescription');
        $this->migrator->delete('tool-{dash}.metaKeywords');

        $this->migrator->delete('tool-slugs.{pascal}');
    }
}