'use client';

import { use } from 'react';
import { useSelectedStoreId } from '@/lib/stores/store-context';
import { ItemForm } from '../item-form';

export default function EditItemPage({ params }: { params: Promise<{ id: string }> }) {
  const { id } = use(params);
  const storeId = useSelectedStoreId();
  if (!storeId) return null;
  return <ItemForm storeId={storeId} itemId={id} />;
}
