"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LayoutStyle = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const sdk_1 = require("@cntrl-site/sdk");
const style_1 = __importDefault(require("styled-jsx/style"));
const LayoutStyle = ({ id, layouts, layoutId, children }) => {
    const layout = layouts.find(l => l.id === layoutId);
    return ((0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
      ${(0, sdk_1.getLayoutMediaQuery)(layoutId, layouts)} {
        ${children === null || children === void 0 ? void 0 : children(layout)}
      }
    ` }));
};
exports.LayoutStyle = LayoutStyle;
