<script lang="ts">
  import type { Snippet } from "svelte";

  const { header, value, children }: { header: string, value?: any, children?: Snippet } = $props();
</script>

{#if !!value}
  <div class="with-header">
    {header}: {#if children}
      {@render children()}
    {:else}
      {value}
    {/if}
  </div>
{/if}