<?php

namespace App\Filament\Resources\Keywords\Schemas;

use Filament\Infolists\Components\TextEntry;
use Filament\Schemas\Schema;

class KeywordInfolist
{
    public static function configure(Schema $schema): Schema
    {
        return $schema->components([
            TextEntry::make('phrase')->label(__('admin.keyword')),
            TextEntry::make('project.name')->label(__('admin.project')),
            TextEntry::make('project.domain')->label(__('admin.domain')),
            TextEntry::make('project.user.email')->label(__('admin.customer')),
            TextEntry::make('search_engine')->label(__('admin.engine'))->formatStateUsing(fn ($state) => $state->label()),
            TextEntry::make('country_code')->label(__('admin.country')),
            TextEntry::make('language_code')->label(__('admin.language')),
            TextEntry::make('device')->label(__('admin.device'))->formatStateUsing(fn ($state) => $state->label()),
            TextEntry::make('status')->label(__('admin.status'))->badge()->formatStateUsing(fn ($state) => $state->label()),
            TextEntry::make('ulid')->label('ULID'),
        ]);
    }
}
