import { Card, Col, Container, Row } from 'react-bootstrap';
import { Head, usePage } from '@inertiajs/react';
import Layout from '../../../Layouts';
import React from 'react';
import { PageProps as InertiaPageProps } from '@inertiajs/core';
import CaesCardsView, { CaesRecord } from '../Caes/CaesCardsView';

type PageProps = InertiaPageProps & { caes: CaesRecord[] };

const ArchivosIndex = () => {
    const { caes = [] } = usePage<PageProps>().props;

    return (
        <React.Fragment>
            <Head title='Archivos' />
            <div className="page-content">
                <Container fluid>
                    <Row>
                        <Col lg={12}>
                            <Card>
                                <Card.Body>
                                    <h5 className="card-title mb-3">Búsqueda</h5>
                                    <CaesCardsView caes={caes} />
                                </Card.Body>
                            </Card>
                        </Col>
                    </Row>
                </Container>
            </div>
        </React.Fragment>
    );
};

ArchivosIndex.layout = (page: any) => <Layout children={page} />;
export default ArchivosIndex;
