import { html, render } from "/js/lib/lit-html.js";
import { Component } from "/js/components/component.js";
import { scrollLocks } from "/js/scrollLocks.js";
import { displayRelativeTime } from "/js/utils.js";
import { closeWithAnimation } from "/js/dialogHelpers.js";
import { enableDragToDismiss } from "/js/dragHelpers.js";
import { Signal, ReactiveStore, effect, untrack } from "/js/signals.js";
import { confirmModal } from "/js/modals/confirm.modal.js";
import { showToast } from "/js/toasts.js";
import "/js/components/app-icon.js";
import {
getLocalRefsFromDraft,
getImagesFromDraftPost,
} from "/js/dataHelpers.js";
import { getDraftDeviceId } from "/js/drafts.js";
import { parseGifFromUrl } from "/js/embedHelpers.js";
import "/js/components/infinite-scroll-container.js";
function draftTagTemplate(name, label, { warning = false } = {}) {
return html`${label}`;
}
function draftMediaTemplate({ images, gif, video }) {
const thumbs = [];
for (const image of images) {
if (image.previewUrl) {
thumbs.push(
html``,
);
}
}
if (gif) {
thumbs.push(
html`
`,
);
}
if (video?.exists) {
thumbs.push(
html`