<script lang="ts">
  // This file was generated by build-components.mjs
  // ANY EDITS WILL BE OVERWRITTEN!
  import { getContext, mount } from 'svelte'
  import {
    FilesList as PreactFilesList,
    type FilesListProps,
    type UppyContext,
  } from '@uppy/components'
  import { h as preactH, render as preactRender } from 'preact'
  import { UppyContextKey } from '../UppyContextProvider.svelte'

  const props: Omit<FilesListProps, 'ctx'> = $props()
  const ctx = getContext<UppyContext>(UppyContextKey)
  let container: HTMLElement

  $effect(() => {
    if (container) {
      preactRender(
        preactH(PreactFilesList, {
          ...props,
          ctx,
        } satisfies FilesListProps),
        container,
      )
    }
  })
</script>

<div bind:this={container}></div>
