// seekora-ui-sdk/packages/react/src/layout/ShopifyContextBridge.tsx
//
// Conditionally wraps children in hydrogen-react's <ShopifyProvider>
// when Shopify boot config (shopDomain + storefrontToken) is detected.
// Non-Shopify storefronts pass through without any extra providers.
import * as React from "react";
import { ShopifyProvider } from "@shopify/hydrogen-react";
import { ShopifyAvailableContext } from "../hooks/useOptionalShopContext";
export function ShopifyContextBridge({ shopDomain, storefrontToken, countryCode = "US", languageCode = "EN", storefrontApiVersion = "2026-04", children, }) {
    if (!shopDomain || !storefrontToken) {
        return React.createElement(React.Fragment, null, children);
    }
    return (React.createElement(ShopifyAvailableContext.Provider, { value: true },
        React.createElement(ShopifyProvider, { storeDomain: shopDomain, storefrontToken: storefrontToken, storefrontApiVersion: storefrontApiVersion, countryIsoCode: countryCode, languageIsoCode: languageCode }, children)));
}
