"use client";

import { useState } from "react";
import { AssetGallery } from "@/components/asset-gallery";
import { PostizPushModal } from "@/components/postiz-push-modal";

export default function GlobalAssetsPage() {
  const [pushModalIds, setPushModalIds] = useState<string[] | null>(null);

  return (
    <div className="space-y-6">
      <h1 className="text-3xl font-bold">Asset Library</h1>
      <AssetGallery onPushToPostiz={(ids) => setPushModalIds(ids)} />
      {pushModalIds && (
        <PostizPushModal
          assetIds={pushModalIds}
          onClose={() => setPushModalIds(null)}
        />
      )}
    </div>
  );
}
