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

export const App = () => (
  <Admin layout={MyLayout} 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>
);