import { FunctionComponent, useMemo } from "react"; import { Link } from "react-router-dom"; import { Anchor, Badge, Container } from "@mantine/core"; import { useDocumentTitle } from "@mantine/hooks"; import { faBookmark as farBookmark } from "@fortawesome/free-regular-svg-icons"; import { faBookmark, faWrench } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ColumnDef } from "@tanstack/react-table"; import { uniqueId } from "lodash"; import { useMovieModification, useMoviesPagination } from "@/apis/hooks"; import { Action } from "@/components"; import { AudioList } from "@/components/bazarr"; import Language from "@/components/bazarr/Language"; import LanguageProfileName from "@/components/bazarr/LanguageProfile"; import { ItemEditModal } from "@/components/forms/ItemEditForm"; import { useModals } from "@/modules/modals"; import ItemView from "@/pages/views/ItemView"; import { BuildKey } from "@/utilities"; const MovieView: FunctionComponent = () => { const modifyMovie = useMovieModification(); const modals = useModals(); const query = useMoviesPagination(); const columns = useMemo[]>( () => [ { id: "monitored", cell: ({ row: { original: { monitored }, }, }) => ( ), }, { header: "Name", accessorKey: "title", cell: ({ row: { original: { title, radarrId }, }, }) => { const target = `/movies/${radarrId}`; return ( {title} ); }, }, { header: "Audio", accessorKey: "audio_language", cell: ({ row: { original: { audio_language: audioLanguage }, }, }) => { return ; }, }, { header: "Languages Profile", accessorKey: "profileId", cell: ({ row: { original: { profileId }, }, }) => { return ( ); }, }, { header: "Missing Subtitles", accessorKey: "missing_subtitles", cell: ({ row: { original: { missing_subtitles: missingSubtitles }, }, }) => { return ( <> {missingSubtitles.map((v) => ( ))} ); }, }, { id: "radarrId", cell: ({ row }) => { return ( modals.openContextModal( ItemEditModal, { mutation: modifyMovie, item: row.original, }, { title: row.original.title, }, ) } icon={faWrench} > ); }, }, ], [modals, modifyMovie], ); useDocumentTitle("Movies - Bazarr"); return ( ); }; export default MovieView;