import * as React from 'react' ; import { CreateDrilldownForm } from '../create_drilldown_form' ; import { Tabs } from '../tabs' ; import { useDrilldownManager } from '../context' ; import { EditDrilldownForm } from '../edit_drilldown_form' ; export const DrilldownManagerContent = ( { } ) => { const drilldowns = useDrilldownManager ( ) ; const route = drilldowns . useRoute ( ) ; if ( route [ 0 ] === 'new' && ! ! route [ 1 ] ) return < CreateDrilldownForm />; if ( route [ 0 ] === 'manage' && ! ! route [ 1 ] ) return < EditDrilldownForm eventId = { route [ 1 ] } />; return < Tabs />; } ;