import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { ResetPassword } from '../components/ResetPassword'

const el = document.getElementById('reset-password-app')
if (el) {
  createRoot(el).render(
    <StrictMode>
      <ResetPassword
        valid={el.dataset.valid === 'true'}
        token={el.dataset.token || ''}
        resetUrl={el.dataset.resetUrl || ''}
        recoverUrl={el.dataset.recoverUrl || 'recover'}
        csrfToken={el.dataset.csrf || ''}
      />
    </StrictMode>,
  )
}
