<?php

namespace Database\Seeders;

use App\Element\CreateElementDto;
use App\Element\ElementRepository;
use App\Set\CreateSetDto;
use App\Set\SetRepository;
use Illuminate\Database\Seeder;

class BaderechHaAvodahSeeder extends Seeder
{
    public function run(): void
    {
        $setRepository = app(SetRepository::class);
        $elementRepository = app(ElementRepository::class);
        $title = 'Baderech HaAvodah';

        $set = $setRepository->create(new CreateSetDto(
            name: $title,
        ));
        $elementRepository->create(new CreateElementDto(
            set: $set,
            title: $title,
            parentElement: null,
        ));
    }
}
