/* 'use client'

import Button from '@/@core/components/mui/Button'
import { Typography } from '@mui/material'
import { useGetAuthorizations } from '@/hooks'
import AuthorizationItemEditor from '@/views/authorizations/AuthorizationItemEditor'
import type { IAuthorization } from '@/types'

export default function AuthorizationsViewPage() {
  const { data, refetch, isFetching } = useGetAuthorizations()
  const items: IAuthorization[] = data?.data ?? []

  return (
    <div className='p-6 space-y-6'>
      <div className='flex items-center justify-between'>
        <Typography variant='h5'>Authorizations</Typography>
        <Button onClick={() => refetch()} disabled={isFetching} variant='outlined' className='w-fit'>
          {isFetching ? 'Refreshing…' : 'Refresh'}
        </Button>
      </div>

      <div className='grid grid-cols-1 lg:grid-cols-2 gap-6'>
        {items.map(it => (
          <AuthorizationItemEditor key={it.id} item={it} onUpdated={() => refetch()} />
        ))}
      </div>
    </div>
  )
}
 */
