import { buildController, } from '../../controller/headless-controller.js';
import { buildProductView, } from './headless-product-view.js';
/**
 * Defines a `ProductView` controller instance.
 *
 * This controller is stateless and does not implement a `subscribe` method,
 * making it simpler but different from other controllers in the system.
 * Its sole purpose is to log an `ec.productView` event.
 *
 * @returns The `ProductView` controller definition.
 *
 * @group Definers
 */
export function defineProductView() {
    return {
        listing: true,
        search: true,
        standalone: true,
        build: (engine) => buildSSRProductView(engine),
    };
}
function buildSSRProductView(engine) {
    const controller = buildController(engine);
    const productView = buildProductView(engine);
    return {
        ...controller,
        ...productView,
    };
}
