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

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

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

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