import { Viewer, DocumentGate } from '@embedpdf/react/runtime';
import type { OpenInput } from '@embedpdf/react/runtime';
import { metadataPlugin, useMetadataState } from '@embedpdf/react/metadata';
import { cloudEngine } from '@cloudpdf/engine';
import './properties.css';
const engine = cloudEngine();
const plugins = [metadataPlugin()];
const welcome: OpenInput = { kind: 'grant', grant: 'shr_gvpJcG1ULUMon19C0D1wODSY' };
const FIELDS = [
['title', 'Title'],
['author', 'Author'],
['subject', 'Subject'],
['keywords', 'Keywords'],
['creator', 'Made in'],
['producer', 'Turned into a PDF by'],
['createdAt', 'Created'],
['modifiedAt', 'Last changed'],
['trapped', 'Trapped'],
] as const;
// Dates are ISO strings: show them in the reader's own format.
const DATES: ReadonlySetDocument properties
{status}
{FIELDS.map(([field, label]) => {
const value = metadata ? show(field, metadata[field]) : null;
return (