<?php

namespace App\Livewire;

use Livewire\Component;

class AssociationAdminTermsAndConditionsModal extends Component
{
    public function submit()
    {
        $user = auth()->user();
        $user->accepted_terms_and_conditions_at = now();
        $user->save();

        $this->dispatch(
            'close-modal',
            id: 'terms-and-conditions'
        );
    }

    public function render()
    {
        return view('livewire.association-admin-terms-and-conditions-modal');
    }
}
