import Refresh from "@material-symbols/svg-400/rounded/autorenew.svg";
import BookmarkAdd from "@material-symbols/svg-400/rounded/bookmark_add.svg";
import MoreHoriz from "@material-symbols/svg-400/rounded/more_horiz.svg";
import MovieInfo from "@material-symbols/svg-400/rounded/movie_info.svg";
import PlayArrow from "@material-symbols/svg-400/rounded/play_arrow-fill.svg";
import Theaters from "@material-symbols/svg-400/rounded/theaters-fill.svg";
import { LinearGradient } from "expo-linear-gradient";
import { Stack } from "expo-router";
import { Fragment } from "react";
import { useTranslation } from "react-i18next";
import { type ImageStyle, Platform, View } from "react-native";
import {
em,
max,
md,
min,
percent,
px,
rem,
type Stylable,
type Theme,
useYoshiki,
vh,
} from "yoshiki/native";
import { WatchListInfo } from "~/components/items/watchlist-info";
import { Rating } from "~/components/rating";
import {
type Genre,
type KImage,
Show,
type Studio,
type WatchStatusV,
} from "~/models";
import {
A,
Chip,
Container,
capitalize,
DottedSeparator,
GradientImageBackground,
H1,
H2,
Head,
HR,
IconButton,
IconFab,
LI,
Link,
Menu,
P,
Poster,
Skeleton,
tooltip,
ts,
UL,
} from "~/primitives";
import { useAccount } from "~/providers/account-context";
import { Fetch, type QueryIdentifier, useMutation } from "~/query";
import { displayRuntime, getDisplayDate } from "~/utils";
const ButtonList = ({
kind,
slug,
playHref,
trailerUrl,
watchStatus,
}: {
kind: "movie" | "serie" | "collection";
slug: string;
playHref: string | null;
trailerUrl: string | null;
watchStatus: WatchStatusV | null;
}) => {
const account = useAccount();
const { css, theme } = useYoshiki();
const { t } = useTranslation();
const metadataRefreshMutation = useMutation({
method: "POST",
path: [kind, slug, "refresh"],
invalidate: null,
});
return (
({
xs: theme.user.paragraph,
md: theme.paragraph,
}),
})}
>
{" "}
({date})
({
xs: theme.user.heading,
md: theme.heading,
}),
})}
>
{name}
{date && (
({ xs: theme.user.heading, md: theme.heading, }), })} > {tagline}
)}{displayRuntime(runtime)}
> )} theme.user.paragraph,
})}
>
{t("show.studios")}:{" "}
{studios.map((studio, i) => (
{i !== 0 && ", "}
theme.user.paragraph,
})}
>
{t("show.genre")}:{" "}
{genres.map((genre, i) => (
{i !== 0 && ", "}
{description ?? t("show.noOverview")}
{t("show.tags")}:
{tags.map((tag) => ({t("show.genre-none")}
)} theme.user.paragraph,
})}
>
{t("show.genre")}:{" "}
{[...Array {i !== 0 && ", "}
{t("show.tags")}:
{[...Array{t("show.links")}:
{Object.entries(data.externalId!) .filter(([_, data]) => data.link) .map(([name, data]) => (