{% import '_includes/forms' as forms %}

<h1>Token Settings</h1>

{{ forms.selectField({
  label: 'JWT Expiration',
  name: 'jwtExpiration',
  value: settings.jwtExpiration,
  options: [
    { value: '15 minutes', label: '15 minutes' },
    { value: '30 minutes', label: '30 minutes' },
    { value: '1 hour', label: '1 hour' },
    { value: '1 day', label: '1 day' },
    { value: '1 week', label: '1 week' },
  ],
}) }}

{{ forms.selectField({
  label: 'Refresh Token Expiration',
  name: 'jwtRefreshExpiration',
  value: settings.jwtRefreshExpiration,
  options: [
    { value: '1 week', label: '1 week' },
    { value: '1 month', label: '1 month' },
    { value: '3 months', label: '3 months' },
    { value: '6 months', label: '6 months' },
    { value: '1 year', label: '1 year' },
  ],
}) }}

{{ forms.autosuggestField({
  label: 'JWT Secret Key',
  instructions: 'This is randomly generated, but feel free to use your own.',
  name: 'jwtSecretKey',
  value: settings.jwtSecretKey,
  suggestEnvVars: true,
}) }}

{{ forms.selectField({
  label: 'SameSite Cookie Policy',
  name: 'sameSitePolicy',
  value: settings.sameSitePolicy,
  options: [
    { value: 'strict', label: 'Strict' },
    { value: 'lax', label: 'Lax' },
    { value: 'none', label: 'None' },
  ],
}) }}
