Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/utils/generateStyleSheet",["module","exports","require","../config/constants/fragmentClassPlaceholder","../config/index","./getFrontendTokenValue","./getLayoutDataItemTopperUniqueClassName","./getLayoutDataItemUniqueClassName"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{itemsWithTopper:t}={}){let a=".lfr-layout-structure-item-row { overflow: hidden; }";return Object.entries(e).forEach((([e,{customCSS:i,styles:l}])=>{let u="",m="";Object.entries(l).forEach((([a,n])=>{if(!o.config.commonStylesFields[a])return;const{cssTemplate:i}=o.config.commonStylesFields[a];t.has(e)&&g.includes(a)?m+="".concat(s(i,d(e,a,n)),"\n"):u+="".concat(s(i,d(e,a,n)),"\n")})),u&&(a+=".".concat((0,c.default)(e)," {\n").concat(u,"}\n")),m&&(a+=".".concat((0,r.default)(e)," {\n").concat(m,"}\n")),i&&(a+=i.replaceAll(n.FRAGMENT_CLASS_PLACEHOLDER,(0,c.default)(e)))})),a};var n=a("../config/constants/fragmentClassPlaceholder"),o=a("../config/index"),i=a("./getFrontendTokenValue"),r=l(a("./getLayoutDataItemTopperUniqueClassName")),c=l(a("./getLayoutDataItemUniqueClassName"));function l(e){return e&&e.__esModule?e:{default:e}}const e={0:"0",1:"0.25",2:"0.5",3:"1",4:"1.5",5:"3",6:"4.5",7:"6",8:"7.5",9:"9",10:"10"},u=["marginBottom","marginLeft","marginRight","marginTop","paddingBottom","paddingLeft","paddingRight","paddingTop"],g=["display","marginBottom","marginLeft","marginRight","marginTop","maxWidth","minWidth","width","shadow"];function d(t,a,n){return u.includes(a)?isNaN(n)?n:"var(--spacer-".concat(n,", ").concat(e[n],"rem)"):"backgroundImage"===a?"var(--lfr-background-image-".concat(t,")"):"opacity"===a?n/100:(0,i.getFrontendTokenValue)(n)}function s(e,t){return e.replaceAll("{value}",t)}}}));
//# sourceMappingURL=generateStyleSheet.js.map