<?php

namespace App\Filament\Admin\Resources\Settings\Tables;

use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Actions\ViewAction;
use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;

class SettingsTable
{
    public static function configure(Table $table): Table
    {
        return $table
            ->columns([
                IconColumn::make('package_active')
                    ->boolean(),
                IconColumn::make('product_active')
                    ->boolean(),
                IconColumn::make('top_up_active')
                    ->boolean(),
                IconColumn::make('blog_active')
                    ->boolean(),
                TextColumn::make('currency')
                    ->searchable(),
                TextColumn::make('en_website_name')
                    ->searchable(),
                TextColumn::make('fa_website_name')
                    ->searchable(),
                TextColumn::make('phone')
                    ->searchable(),
                TextColumn::make('whatsapp_link')
                    ->searchable(),
                TextColumn::make('facebook_link')
                    ->searchable(),
                TextColumn::make('instagram_link')
                    ->searchable(),
                TextColumn::make('twitter_link')
                    ->searchable(),
                TextColumn::make('linkedin_link')
                    ->searchable(),
                TextColumn::make('youtube_link')
                    ->searchable(),
                TextColumn::make('tiktok_link')
                    ->searchable(),
                TextColumn::make('sys_email')
                    ->searchable(),
                TextColumn::make('created_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
                TextColumn::make('updated_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
            ->filters([
                //
            ])
            ->recordActions([
                ViewAction::make(),
                EditAction::make(),
            ])
            ->toolbarActions([
                BulkActionGroup::make([
                    DeleteBulkAction::make(),
                ]),
            ]);
    }
}
