"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImageCenterBodyComp = void 0;
const react_1 = __importDefault(require("react"));
const Styled = __importStar(require("./index.styled"));
const IconWithImage_1 = require("../IconWithImage");
/**
 * ImageCenterBodyComp : 이미지 한개만 갖고 있고, 상하좌우 중앙정렬을 자동 세팅해줍니다.
 *
 * @param imagePath
 * - process.env.NEXT_PUBLIC_ASSETS_URL 도 넘겨줍니다.
 * - A@2x.png -> A 만 넣기 / B.svg -> B 만 넣기
 * @returns
 */
const ImageCenterBodyComp = ({ imagePath, imageType, imageWidth, imageHeight }) => {
    let ImgComp = react_1.default.createElement(react_1.default.Fragment, null);
    if (imageType === 'pngSet') {
        ImgComp = react_1.default.createElement(IconWithImage_1.IconWithImage, { srcPath: imagePath, width: imageWidth });
    }
    else if (imageType === 'png') {
        ImgComp = react_1.default.createElement(Styled.ImgBase, { src: `${imagePath}.png`, width: imageWidth, height: imageHeight });
    }
    else if (imageType === 'svg') {
        ImgComp = react_1.default.createElement(Styled.ImgBase, { src: `${imagePath}.svg`, width: imageWidth, height: imageHeight });
    }
    return react_1.default.createElement(Styled.CenterBody, null, ImgComp);
};
exports.ImageCenterBodyComp = ImageCenterBodyComp;
