{"version":3,"file":"StackHeaderTitle.js","names":[],"sources":["esm/layouts/stack-utils/StackHeaderTitle.js"],"sourcesContent":["import { NAVIGATOR_CONFIG } from \"../../headless/children\";\nimport { PLATFORM } from \"../../utils/platform\";\nimport { convertFontWeightToStringFontWeight, flattenStyle } from \"../../utils/style\";\nfunction StackHeaderTitle(_props) {\n  return null;\n}\nObject.assign(StackHeaderTitle, { [NAVIGATOR_CONFIG]: true });\nfunction appendStackHeaderTitlePropsToOptions(options, props) {\n  const flattenedStyle = flattenStyle(props.style);\n  const flattenedLargeStyle = flattenStyle(props.largeStyle);\n  const titleStyle = flattenedStyle ? {\n    ...flattenedStyle,\n    ...flattenedStyle?.fontWeight ? { fontWeight: convertFontWeightToStringFontWeight(flattenedStyle.fontWeight) } : {}\n  } : void 0;\n  const largeTitleStyle = flattenedLargeStyle ? {\n    ...flattenedLargeStyle,\n    ...flattenedLargeStyle?.fontWeight ? {\n      fontWeight: convertFontWeightToStringFontWeight(\n        flattenedLargeStyle.fontWeight\n      )\n    } : {}\n  } : void 0;\n  return {\n    ...options,\n    title: props.children,\n    headerLargeTitleEnabled: props.large,\n    // Large titles on iOS require headerTransparent for proper scroll behavior\n    // Only set on iOS since headerLargeTitleEnabled is iOS-only\n    ...props.large && PLATFORM === \"ios\" && { headerTransparent: true },\n    headerTitleAlign: flattenedStyle?.textAlign,\n    // Only set styles when explicitly configured to avoid interfering with native defaults\n    ...titleStyle && Object.keys(titleStyle).length > 0 && { headerTitleStyle: titleStyle },\n    ...largeTitleStyle && Object.keys(largeTitleStyle).length > 0 && {\n      headerLargeTitleStyle: largeTitleStyle\n    }\n  };\n}\nexport {\n  StackHeaderTitle,\n  appendStackHeaderTitlePropsToOptions\n};\n//# sourceMappingURL=StackHeaderTitle.js.map\n"],"mappings":";;;;;AAGA,SAAS,iBAAiB,QAAQ;CAChC,OAAO;AACT;AACA,OAAO,OAAO,kBAAkB,GAAG,mBAAmB,KAAK,CAAC;AAC5D,SAAS,qCAAqC,SAAS,OAAO;CAC5D,MAAM,iBAAiB,aAAa,MAAM,KAAK;CAC/C,MAAM,sBAAsB,aAAa,MAAM,UAAU;CACzD,MAAM,aAAa,iBAAiB;EAClC,GAAG;EACH,GAAG,gBAAgB,aAAa,EAAE,YAAY,oCAAoC,eAAe,UAAU,EAAE,IAAI,CAAC;CACpH,IAAI,KAAK;CACT,MAAM,kBAAkB,sBAAsB;EAC5C,GAAG;EACH,GAAG,qBAAqB,aAAa,EACnC,YAAY,oCACV,oBAAoB,UACtB,EACF,IAAI,CAAC;CACP,IAAI,KAAK;CACT,OAAO;EACL,GAAG;EACH,OAAO,MAAM;EACb,yBAAyB,MAAM;EAG/B,GAAG,MAAM,SAAS,aAAa,SAAS,EAAE,mBAAmB,KAAK;EAClE,kBAAkB,gBAAgB;EAElC,GAAG,cAAc,OAAO,KAAK,UAAU,CAAC,CAAC,SAAS,KAAK,EAAE,kBAAkB,WAAW;EACtF,GAAG,mBAAmB,OAAO,KAAK,eAAe,CAAC,CAAC,SAAS,KAAK,EAC/D,uBAAuB,gBACzB;CACF;AACF"}