<script>
    import Modal from "../../components/Modal.svelte";
    import TableRutas from "./TableRutas.svelte";
    import { createEventDispatcher } from "svelte";
    const dispatch = createEventDispatcher();

    export let show = true;

    function onSelect(item) {
        dispatch('select', item)
        dispatch('close')
    }
</script>

<div class={show ? '' : 'd-none'}>
    <Modal title="Rutas" size="xl" on:close={() => dispatch('close')}>
        <TableRutas on:select={ev => onSelect(ev.detail)} />
    </Modal>
</div>