From bce557cc2dc767628bed6aac87301a1be7c5431b Mon Sep 17 00:00:00 2001
From: rxliuli <rxliuli@gmail.com>
Date: Tue, 4 Nov 2025 05:03:50 +0800
Subject: init commit

---
 .../jet/shelf/AppTrailerLockupShelf.svelte         | 48 ++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 src/components/jet/shelf/AppTrailerLockupShelf.svelte

(limited to 'src/components/jet/shelf/AppTrailerLockupShelf.svelte')

diff --git a/src/components/jet/shelf/AppTrailerLockupShelf.svelte b/src/components/jet/shelf/AppTrailerLockupShelf.svelte
new file mode 100644
index 0000000..f516074
--- /dev/null
+++ b/src/components/jet/shelf/AppTrailerLockupShelf.svelte
@@ -0,0 +1,48 @@
+<script lang="ts" context="module">
+    import type {
+        TrailersLockup,
+        MixedMediaLockup,
+        Shelf,
+    } from '@jet-app/app-store/api/models';
+
+    type AppTrailerLockupItem = TrailersLockup | MixedMediaLockup;
+
+    interface AppTrailerLockupShelf extends Shelf {
+        contentType: 'appTrailerLockup';
+        items: AppTrailerLockupItem[];
+    }
+
+    export function isAppTrailerLockupShelf(
+        shelf: Shelf,
+    ): shelf is AppTrailerLockupShelf {
+        return (
+            shelf.contentType === 'appTrailerLockup' &&
+            Array.isArray(shelf.items)
+        );
+    }
+
+    function isMixedMediaLockup(
+        item: AppTrailerLockupItem,
+    ): item is MixedMediaLockup {
+        return Array.isArray(item.trailers);
+    }
+</script>
+
+<script lang="ts">
+    import ShelfItemLayout from '~/components/ShelfItemLayout.svelte';
+    import ShelfWrapper from '~/components/Shelf/Wrapper.svelte';
+    import MixedMediaLockupItem from '~/components/jet/item/MixedMediaLockupItem.svelte';
+    import TrailersLockupItem from '~/components/jet/item/TrailersLockupItem.svelte';
+
+    export let shelf: AppTrailerLockupShelf;
+</script>
+
+<ShelfWrapper {shelf}>
+    <ShelfItemLayout {shelf} gridType="B" let:item>
+        {#if isMixedMediaLockup(item)}
+            <MixedMediaLockupItem {item} />
+        {:else}
+            <TrailersLockupItem {item} />
+        {/if}
+    </ShelfItemLayout>
+</ShelfWrapper>
-- 
cgit v1.2.3

