{"version":3,"file":"utils.mjs","names":[],"sources":["../../../../../src/react-renderer/a2ui-react/catalog/basic/utils.ts"],"sourcesContent":["/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type React from \"react\";\n\n/** Standard leaf margin from the implementation guide. */\nexport const LEAF_MARGIN = \"8px\";\n\n/** Standard internal padding for visually bounded containers. */\nexport const CONTAINER_PADDING = \"16px\";\n\n/** Standard border for cards and inputs. */\nexport const STANDARD_BORDER = \"1px solid #ccc\";\n\n/** Standard border radius. */\nexport const STANDARD_RADIUS = \"8px\";\n\nexport const mapJustify = (j?: string) => {\n  switch (j) {\n    case \"center\":\n      return \"center\";\n    case \"end\":\n      return \"flex-end\";\n    case \"spaceAround\":\n      return \"space-around\";\n    case \"spaceBetween\":\n      return \"space-between\";\n    case \"spaceEvenly\":\n      return \"space-evenly\";\n    case \"start\":\n      return \"flex-start\";\n    case \"stretch\":\n      return \"stretch\";\n    default:\n      return \"flex-start\";\n  }\n};\n\nexport const mapAlign = (a?: string) => {\n  switch (a) {\n    case \"start\":\n      return \"flex-start\";\n    case \"center\":\n      return \"center\";\n    case \"end\":\n      return \"flex-end\";\n    case \"stretch\":\n      return \"stretch\";\n    default:\n      return \"stretch\";\n  }\n};\n\nexport const getBaseLeafStyle = (): React.CSSProperties => ({\n  margin: LEAF_MARGIN,\n  boxSizing: \"border-box\",\n});\n\nexport const getBaseContainerStyle = (): React.CSSProperties => ({\n  margin: LEAF_MARGIN,\n  padding: CONTAINER_PADDING,\n  border: STANDARD_BORDER,\n  borderRadius: STANDARD_RADIUS,\n  boxSizing: \"border-box\",\n});\n"],"mappings":";;AAmBA,MAAa,cAAc;;AAG3B,MAAa,oBAAoB;;AAGjC,MAAa,kBAAkB;;AAG/B,MAAa,kBAAkB;AAE/B,MAAa,cAAc,MAAe;AACxC,SAAQ,GAAR;EACE,KAAK,SACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,cACH,QAAO;EACT,KAAK,eACH,QAAO;EACT,KAAK,cACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,KAAK,UACH,QAAO;EACT,QACE,QAAO;;;AAIb,MAAa,YAAY,MAAe;AACtC,SAAQ,GAAR;EACE,KAAK,QACH,QAAO;EACT,KAAK,SACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,UACH,QAAO;EACT,QACE,QAAO;;;AAIb,MAAa,0BAA+C;CAC1D,QAAQ;CACR,WAAW;CACZ;AAED,MAAa,+BAAoD;CAC/D,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,cAAc;CACd,WAAW;CACZ"}