import type { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
import bookingBundle from '../pisell-reservation-booking-page/meta';

type BookingExport = ComponentMetadata & { snippets?: Snippet[] };

const booking = bookingBundle as BookingExport;
const { snippets: _bookingSnippets, ...bookingMeta } = booking;

/** 与 PisellReservationBookingPage 同实现，保留 componentName 供存量 schema 解析 */
const Meta: ComponentMetadata = {
  ...bookingMeta,
  componentName: 'PisellReservation',
  title: '预约页面（兼容旧 schema）',
  npm: {
    ...bookingMeta.npm!,
    exportName: 'PisellReservation',
  },
};

const snippets: Snippet[] = [
  {
    title: '预约页面（兼容旧 schema）',
    screenshot: '',
    schema: {
      componentName: 'PisellReservation',
    },
  },
];

export default {
  ...Meta,
  snippets,
};
