// Migrated from legacy JSON RMT. Runtime parity target: docs/xtendrmt-parsedown-docs.core.json
template docs.xtend.parsedownPilot {
  datasource docsReadme from endpoint "/docs/de/README.md" {
    method GET
    contract "xtend.docs.parsedown-rmt-page.v1"
  }

  action routeLoaded {
    input id string
    emit docsRouteLoaded with id input.id
  }

  portal docsRoot root "main" layer surface

  surface docsReadme kind page component x-router {
    portal docsRoot
    lane visible weight 80 {
      mount docsPage from endpoint docs.route.render {
        slot content {
          hydrate docsMarkdown from datasource docsReadme
        }
      }
    }
    on route-change -> action routeLoaded {
      payload id from surface.id
    }
  }

  surface docsSearch kind region component x-input {
    portal docsRoot
    lane idle weight 40 {
      prewarm docsSearchIndex from worker docs.search.prepare
    }
  }

  surface docsMedia kind region component x-player {
    portal docsRoot
    lane idle weight 32 {
      hydrate docsMediaPlaceholder from endpoint docs.media.lazy
    }
  }
}
