using ConstructorAppUI.Dtos.ContactUsDtos;
using Microsoft.AspNetCore.Mvc;

namespace ConstructorAppUI.ViewComponents.HomeComponents
{
    public class _HomeContactUsPartialComponent : ViewComponent
    {
        private readonly string _apiBaseUrl;

        public _HomeContactUsPartialComponent(IConfiguration configuration)
        {
            _apiBaseUrl = configuration["ApiSettings:BaseUrl"];
        }

        public IViewComponentResult Invoke()
        {
            // ViewBag ile API base URL'sini taşıyoruz
            ViewBag.ApiBaseUrl = _apiBaseUrl;

            var model = new CreateContactUsDto(); // Formu boş model ile başlatıyoruz
            return View(model);
        }
    }
    }

