<?php

namespace App\Domains\Admin\Actions\UpdateTenantImpress;

class UpdateTenantImpressAction
{
    public function __construct(private UpdateTenantImpressRequest $request)
    {
    }

    public function execute(): UpdateTenantImpressResponse
    {
        $response = new UpdateTenantImpressResponse();

        $this->request->tenant->update([
            'impress_text' => $this->request->impressText,
        ]);

        $response->success = true;
        $response->message = 'Impressum wurde gespeichert.';

        return $response;
    }
}
