import {
  Admin,
  Resource,
  ListGuesser,
  EditGuesser,
  ShowGuesser,
} from "react-admin";
import { Layout } from "./Layout";
import { dataProvider } from "./dataProvider";
import {UserList} from "./users.tsx";
import {UserEdit} from "./UserEdit.tsx";
import {PostEdit} from "./PostEdit.tsx";
import {CommentEdit} from "./CommentEdit.tsx";
import {AlbumEdit} from "./AlbumEdit.tsx";
import {PhotoEdit} from "./PhotoEdit.tsx"

export const App = () => (
  <Admin layout={Layout} dataProvider={dataProvider}>
    <Resource
      name="users"
      list={UserList}
      edit={UserEdit}
      show={ShowGuesser}
      />
    <Resource
        name="posts"
        list={ListGuesser}
        edit={PostEdit}
        show={ShowGuesser}
    />
    <Resource
        name="comments"
        list={ListGuesser}
        edit={CommentEdit}
        show={ShowGuesser}
    />
    <Resource
        name="albums"
        list={ListGuesser}
        edit={AlbumEdit}
        show={ShowGuesser}
    />
    <Resource
        name="photos"
        list={ListGuesser}
        edit={PhotoEdit}
        show={ShowGuesser}
    />
  </Admin>
);