using System;
using Minesweeper.Presentation.Presenters;
using VContainer.Unity;

namespace Minesweeper.Infrastructure
{
    public sealed class MinesweeperEntryPoint : IStartable, IDisposable
    {
        private readonly MainMenuPresenter mainMenuPresenter;
        private readonly GamePresenter gamePresenter;

        public MinesweeperEntryPoint(MainMenuPresenter mainMenuPresenter, GamePresenter gamePresenter)
        {
            this.mainMenuPresenter = mainMenuPresenter;
            this.gamePresenter = gamePresenter;
        }

        public void Start()
        {
            mainMenuPresenter.Initialize();
            gamePresenter.Initialize();
        }

        public void Dispose()
        {
            gamePresenter.Dispose();
            mainMenuPresenter.Dispose();
        }
    }
}
