<?php

namespace LaraBB\Settings\Actions\Prefix;

use LaraBB\Settings\Tasks\Prefix\FindTask as FindPrefixTask;

/**
 * Class IndexAction
 * @package LaraBB\Settings\Actions\Prefix
 */
class OverviewAction
{
    /**
     * IndexAction constructor.
     * @param FindPrefixTask $findPrefixTask
     */
    public function __construct(private readonly FindPrefixTask $findPrefixTask)
    {
    }

    /**
     * @return array
     */
    public function run(): array
    {
        return [
            'active'   => 'settings',
            'prefixes' => $this->findPrefixTask->run()
        ];
    }
}
