@admin-layout/tailwind-design-pro 11.0.4-alpha.4 → 12.0.16-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/README.md +401 -1
  2. package/lib/cdm-locales/en/settings.json +40 -1
  3. package/lib/cdm-locales/es/settings.json +42 -3
  4. package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
  5. package/lib/components/LanguageMenu/LanguageMenu.js +8 -18
  6. package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
  7. package/lib/components/Layout/BasicLayout/index.d.ts +1 -8
  8. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  9. package/lib/components/Layout/BasicLayout/index.js +141 -64
  10. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  11. package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
  12. package/lib/components/Layout/BasicLayout/utils.js +1 -14
  13. package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
  14. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts +1 -8
  15. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
  16. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
  17. package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
  18. package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
  19. package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -14
  20. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  21. package/lib/components/Layout/GlobalHeader/Header.js +78 -53
  22. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  23. package/lib/components/Layout/GlobalHeader/Logo.d.ts +4 -0
  24. package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +1 -0
  25. package/lib/components/Layout/GlobalHeader/Logo.js +141 -0
  26. package/lib/components/Layout/GlobalHeader/Logo.js.map +1 -0
  27. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +6 -0
  28. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -0
  29. package/lib/components/Layout/GlobalHeader/MainHeader.js +228 -0
  30. package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -0
  31. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts +1 -12
  32. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
  33. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +4 -4
  34. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
  35. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +2 -16
  36. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
  37. package/lib/components/Layout/GlobalHeader/RightContent.js +23 -0
  38. package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
  39. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts +4 -0
  40. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -0
  41. package/lib/components/Layout/GlobalHeader/RightMenu.js +274 -0
  42. package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -0
  43. package/lib/components/Layout/GlobalHeader/SearchBar.d.ts +9 -0
  44. package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -0
  45. package/lib/components/Layout/GlobalHeader/SearchBar.js +118 -0
  46. package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -0
  47. package/lib/components/Layout/GlobalHeader/index.d.ts +4 -0
  48. package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -0
  49. package/lib/components/Layout/ProTailwindLayout.d.ts +2 -0
  50. package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
  51. package/lib/components/Layout/ProTailwindLayout.js +7 -3
  52. package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
  53. package/lib/components/Layout/Sidebar/Divider.d.ts +1 -31
  54. package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
  55. package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
  56. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +5 -0
  57. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -0
  58. package/lib/components/Layout/Sidebar/DynamicIcon.js +51 -0
  59. package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -0
  60. package/lib/components/Layout/Sidebar/Sidebar.d.ts +1 -11
  61. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
  62. package/lib/components/Layout/Sidebar/Sidebar.js +117 -78
  63. package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
  64. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +3 -5
  65. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -1
  66. package/lib/components/Layout/Sidebar/SidebarMenu.js +132 -45
  67. package/lib/components/Layout/Sidebar/SidebarMenu.js.map +1 -1
  68. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
  69. package/lib/components/Layout/TailwindLayout.js +34 -14
  70. package/lib/components/Layout/TailwindLayout.js.map +1 -1
  71. package/lib/components/Layout/getPageTitle.d.ts +1 -16
  72. package/lib/components/Layout/getPageTitle.d.ts.map +1 -1
  73. package/lib/components/Layout/getPageTitle.js +1 -1
  74. package/lib/components/Layout/getPageTitle.js.map +1 -1
  75. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +4 -0
  76. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
  77. package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
  78. package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
  79. package/lib/components/Layout/slot-fill/Footer.d.ts +1 -1
  80. package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
  81. package/lib/components/Layout/slot-fill/Footer.js +6 -6
  82. package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
  83. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
  84. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +3 -0
  85. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -0
  86. package/lib/components/Layout/slot-fill/HeaderSearchBar.js +6 -0
  87. package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -0
  88. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +3 -0
  89. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -0
  90. package/lib/components/Layout/slot-fill/HeaderSearchButton.js +6 -0
  91. package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -0
  92. package/lib/components/Layout/slot-fill/RightContent.d.ts +3 -0
  93. package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -0
  94. package/lib/components/Layout/slot-fill/RightContent.js +6 -0
  95. package/lib/components/Layout/slot-fill/RightContent.js.map +1 -0
  96. package/lib/components/Layout/slot-fill/index.d.ts +4 -0
  97. package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
  98. package/lib/components/Layout/util.d.ts.map +1 -1
  99. package/lib/components/Layout/util.js +12 -0
  100. package/lib/components/Layout/util.js.map +1 -0
  101. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +1 -6
  102. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -1
  103. package/lib/components/SettingDrawer/CheckBoxTheme.js +106 -31
  104. package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -1
  105. package/lib/components/SettingDrawer/InvitationSettings.d.ts +3 -0
  106. package/lib/components/SettingDrawer/InvitationSettings.d.ts.map +1 -0
  107. package/lib/components/SettingDrawer/InvitationSettings.js +79 -0
  108. package/lib/components/SettingDrawer/InvitationSettings.js.map +1 -0
  109. package/lib/components/SettingDrawer/LayoutChange.d.ts +2 -6
  110. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
  111. package/lib/components/SettingDrawer/LayoutChange.js +84 -30
  112. package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
  113. package/lib/components/SettingDrawer/NavigationsModes.d.ts +3 -0
  114. package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -0
  115. package/lib/components/SettingDrawer/NavigationsModes.js +289 -0
  116. package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -0
  117. package/lib/components/SettingDrawer/RegionalSettings.d.ts +1 -6
  118. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
  119. package/lib/components/SettingDrawer/RegionalSettings.js +696 -51
  120. package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
  121. package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -25
  122. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  123. package/lib/components/SettingDrawer/SettingDrawer.js +249 -113
  124. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  125. package/lib/components/SettingDrawer/Switch/index.d.ts +2 -8
  126. package/lib/components/SettingDrawer/Switch/index.d.ts.map +1 -1
  127. package/lib/components/SettingDrawer/Switch/index.js +17 -34
  128. package/lib/components/SettingDrawer/Switch/index.js.map +1 -1
  129. package/lib/components/SettingDrawer/ThemeColor.d.ts +1 -6
  130. package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -1
  131. package/lib/components/SettingDrawer/ThemeColor.js +3 -0
  132. package/lib/components/SettingDrawer/ThemeColor.js.map +1 -1
  133. package/lib/components/SettingDrawer/ThemeSelector.d.ts +3 -0
  134. package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +1 -0
  135. package/lib/components/SettingDrawer/ThemeSelector.js +18 -0
  136. package/lib/components/SettingDrawer/ThemeSelector.js.map +1 -0
  137. package/lib/components/SettingDrawer/WebFontsSelector.d.ts +3 -0
  138. package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +1 -0
  139. package/lib/components/SettingDrawer/WebFontsSelector.js +24 -0
  140. package/lib/components/SettingDrawer/WebFontsSelector.js.map +1 -0
  141. package/lib/components/SettingDrawer/types.d.ts +91 -0
  142. package/lib/components/SettingDrawer/types.d.ts.map +1 -0
  143. package/lib/components/UI/CardList.d.ts +61 -0
  144. package/lib/components/UI/CardList.d.ts.map +1 -0
  145. package/lib/components/UI/CardList.js +43 -0
  146. package/lib/components/UI/CardList.js.map +1 -0
  147. package/lib/components/UI/CategoriesTypeList.d.ts +29 -0
  148. package/lib/components/UI/CategoriesTypeList.d.ts.map +1 -0
  149. package/lib/components/UI/CategoriesTypeList.js +139 -0
  150. package/lib/components/UI/CategoriesTypeList.js.map +1 -0
  151. package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +83 -0
  152. package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +1 -0
  153. package/lib/components/UI/LazyLoadingGoogleMarker.js +107 -0
  154. package/lib/components/UI/LazyLoadingGoogleMarker.js.map +1 -0
  155. package/lib/components/UI/Pagination.d.ts +6 -0
  156. package/lib/components/UI/Pagination.d.ts.map +1 -0
  157. package/lib/components/UI/Pagination.js +56 -0
  158. package/lib/components/UI/Pagination.js.map +1 -0
  159. package/lib/components/UI/ParamSearchResultContainer.d.ts +99 -0
  160. package/lib/components/UI/ParamSearchResultContainer.d.ts.map +1 -0
  161. package/lib/components/UI/ParamSearchResultContainer.js +120 -0
  162. package/lib/components/UI/ParamSearchResultContainer.js.map +1 -0
  163. package/lib/components/UI/PropertyCard.d.ts +24 -0
  164. package/lib/components/UI/PropertyCard.d.ts.map +1 -0
  165. package/lib/components/UI/PropertyCard.js +420 -0
  166. package/lib/components/UI/PropertyCard.js.map +1 -0
  167. package/lib/components/UI/PropertyCardOnMap.d.ts +10 -0
  168. package/lib/components/UI/PropertyCardOnMap.d.ts.map +1 -0
  169. package/lib/components/UI/PropertyCardOnMap.js +108 -0
  170. package/lib/components/UI/PropertyCardOnMap.js.map +1 -0
  171. package/lib/components/UI/VehicleCard/PricePopover.d.ts +8 -0
  172. package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +1 -0
  173. package/lib/components/UI/VehicleCard/PricePopover.js +98 -0
  174. package/lib/components/UI/VehicleCard/PricePopover.js.map +1 -0
  175. package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +7 -0
  176. package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +1 -0
  177. package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +9 -0
  178. package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +1 -0
  179. package/lib/components/UI/VehicleCard/VehicleFeature.js +22 -0
  180. package/lib/components/UI/VehicleCard/VehicleFeature.js.map +1 -0
  181. package/lib/components/UI/VehicleCard/types.d.ts +59 -0
  182. package/lib/components/UI/VehicleCard/types.d.ts.map +1 -0
  183. package/lib/components/UI/VehicleCard.d.ts +15 -0
  184. package/lib/components/UI/VehicleCard.d.ts.map +1 -0
  185. package/lib/components/UI/VehicleCard.js +166 -0
  186. package/lib/components/UI/VehicleCard.js.map +1 -0
  187. package/lib/components/UI/VehicleCardList.d.ts +14 -0
  188. package/lib/components/UI/VehicleCardList.d.ts.map +1 -0
  189. package/lib/components/UI/VehicleCardList.js +38 -0
  190. package/lib/components/UI/VehicleCardList.js.map +1 -0
  191. package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +90 -0
  192. package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +1 -0
  193. package/lib/components/UI/icons/LocationIcon.d.ts +7 -0
  194. package/lib/components/UI/icons/LocationIcon.d.ts.map +1 -0
  195. package/lib/components/UI/icons/LocationIcon.js +18 -0
  196. package/lib/components/UI/icons/LocationIcon.js.map +1 -0
  197. package/lib/components/UI/icons/index.d.ts +2 -0
  198. package/lib/components/UI/icons/index.d.ts.map +1 -0
  199. package/lib/components/UI/index.d.ts +10 -0
  200. package/lib/components/UI/index.d.ts.map +1 -0
  201. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +11 -1
  202. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
  203. package/lib/components/index.d.ts +3 -0
  204. package/lib/components/index.d.ts.map +1 -0
  205. package/lib/components/index.js +1 -0
  206. package/lib/components/index.js.map +1 -0
  207. package/lib/components/typings.d.ts +139 -49
  208. package/lib/components/typings.d.ts.map +1 -1
  209. package/lib/components/typings.js +6 -0
  210. package/lib/components/typings.js.map +1 -0
  211. package/lib/compute.d.ts.map +1 -1
  212. package/lib/compute.js +6 -4
  213. package/lib/compute.js.map +1 -1
  214. package/lib/config/analytics-config.d.ts +59 -0
  215. package/lib/config/analytics-config.d.ts.map +1 -0
  216. package/lib/config/constants.d.ts +8 -0
  217. package/lib/config/constants.d.ts.map +1 -0
  218. package/lib/config/constants.js +32 -0
  219. package/lib/config/constants.js.map +1 -0
  220. package/lib/config/env-config.d.ts +18 -0
  221. package/lib/config/env-config.d.ts.map +1 -1
  222. package/lib/config/env-config.js +76 -1
  223. package/lib/config/env-config.js.map +1 -1
  224. package/lib/config/index.d.ts +3 -0
  225. package/lib/config/index.d.ts.map +1 -0
  226. package/lib/helpers/DynamicIcon.d.ts +7 -4
  227. package/lib/helpers/DynamicIcon.d.ts.map +1 -1
  228. package/lib/helpers/DynamicIcon.js +51 -0
  229. package/lib/helpers/DynamicIcon.js.map +1 -0
  230. package/lib/hooks/index.d.ts +6 -0
  231. package/lib/hooks/index.d.ts.map +1 -0
  232. package/lib/hooks/use-get-current-lat-long.d.ts +18 -0
  233. package/lib/hooks/use-get-current-lat-long.d.ts.map +1 -0
  234. package/lib/hooks/use-get-current-lat-long.js +29 -0
  235. package/lib/hooks/use-get-current-lat-long.js.map +1 -0
  236. package/lib/hooks/useMediaQuery.d.ts +14 -0
  237. package/lib/hooks/useMediaQuery.d.ts.map +1 -0
  238. package/lib/hooks/useMediaQuery.js +48 -0
  239. package/lib/hooks/useMediaQuery.js.map +1 -0
  240. package/lib/hooks/useScrollThreshold.d.ts +12 -0
  241. package/lib/hooks/useScrollThreshold.d.ts.map +1 -0
  242. package/lib/hooks/useScrollThreshold.js +60 -0
  243. package/lib/hooks/useScrollThreshold.js.map +1 -0
  244. package/lib/hooks/useTailwindTheme.d.ts +34 -0
  245. package/lib/hooks/useTailwindTheme.d.ts.map +1 -0
  246. package/lib/hooks/useTailwindTheme.js +82 -0
  247. package/lib/hooks/useTailwindTheme.js.map +1 -0
  248. package/lib/hooks/useWindowSize.d.ts +6 -0
  249. package/lib/hooks/useWindowSize.d.ts.map +1 -0
  250. package/lib/hooks/useWindowSize.js +20 -0
  251. package/lib/hooks/useWindowSize.js.map +1 -0
  252. package/lib/icons.d.ts +16 -0
  253. package/lib/icons.d.ts.map +1 -0
  254. package/lib/icons.js +12 -0
  255. package/lib/icons.js.map +1 -0
  256. package/lib/index.d.ts +2 -3
  257. package/lib/index.d.ts.map +1 -1
  258. package/lib/index.js +1 -1
  259. package/lib/index.js.map +1 -1
  260. package/lib/machines/settingsMachine.d.ts +6 -0
  261. package/lib/machines/settingsMachine.d.ts.map +1 -0
  262. package/lib/machines/settingsMachine.js +206 -0
  263. package/lib/machines/settingsMachine.js.map +1 -0
  264. package/lib/machines/types.d.ts +174 -0
  265. package/lib/machines/types.d.ts.map +1 -0
  266. package/lib/machines/types.js +5 -0
  267. package/lib/machines/types.js.map +1 -0
  268. package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts +6 -0
  269. package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +1 -0
  270. package/lib/middlewares/bookingCarRentalMiddleware.d.ts +6 -0
  271. package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +1 -0
  272. package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +7 -0
  273. package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +1 -0
  274. package/lib/middlewares/datasourcesMiddleware.d.ts +6 -0
  275. package/lib/middlewares/datasourcesMiddleware.d.ts.map +1 -0
  276. package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +7 -0
  277. package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +1 -0
  278. package/lib/module.d.ts +0 -1
  279. package/lib/module.d.ts.map +1 -1
  280. package/lib/module.js +14 -15
  281. package/lib/module.js.map +1 -1
  282. package/lib/redux/index.d.ts +2 -0
  283. package/lib/redux/index.d.ts.map +1 -0
  284. package/lib/redux/searchReducer.d.ts +42 -0
  285. package/lib/redux/searchReducer.d.ts.map +1 -0
  286. package/lib/redux/searchReducer.js +64 -0
  287. package/lib/redux/searchReducer.js.map +1 -0
  288. package/lib/routes.json +1 -0
  289. package/lib/styles/index.css +667 -45
  290. package/lib/tailwindConfig.d.ts +100 -0
  291. package/lib/tailwindConfig.d.ts.map +1 -0
  292. package/lib/tailwindConfig.js +101 -0
  293. package/lib/tailwindConfig.js.map +1 -0
  294. package/lib/utils/analytics-utils.d.ts +43 -0
  295. package/lib/utils/analytics-utils.d.ts.map +1 -0
  296. package/lib/utils/analytics.d.ts +48 -0
  297. package/lib/utils/analytics.d.ts.map +1 -0
  298. package/lib/utils/formateCarData.d.ts +2 -0
  299. package/lib/utils/formateCarData.d.ts.map +1 -0
  300. package/lib/utils/menu.d.ts.map +1 -1
  301. package/lib/utils/test-utils.d.ts.map +1 -1
  302. package/lib/utils/utils/index.d.ts.map +1 -1
  303. package/package.json +7 -5
  304. package/lib/components/Layout/GlobalFooter/Copyright.js +0 -8
  305. package/lib/components/Layout/GlobalFooter/Copyright.js.map +0 -1
  306. package/lib/components/Layout/GlobalFooter/Footer.js +0 -22
  307. package/lib/components/Layout/GlobalFooter/Footer.js.map +0 -1
  308. package/lib/components/defaultSettings.d.ts +0 -4
  309. package/lib/components/defaultSettings.d.ts.map +0 -1
  310. package/lib/components/defaultSettings.js +0 -14
  311. package/lib/components/defaultSettings.js.map +0 -1
  312. package/lib/utils/index.d.ts +0 -2
  313. package/lib/utils/index.d.ts.map +0 -1
  314. package/lib/utils/index.js +0 -13
  315. package/lib/utils/index.js.map +0 -1
@@ -1,94 +1,739 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';function RegionalSettings(props) {
2
- const {
3
- settings,
4
- changeSetting
5
- } = props;
1
+ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';import {SearchBarBehavior}from'../../machines/types.js';import {config}from'../../config/env-config.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import'../../hooks/use-get-current-lat-long.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';function RegionalSettings(props) {
6
2
  const {
7
3
  t
8
4
  } = useTranslation('settings');
9
5
  const {
10
- showHeader,
11
- showFooter,
12
- searchBarRender,
13
- showMenu,
14
- menuHeaderRender,
6
+ settings,
7
+ changeSetting,
8
+ location
9
+ } = props;
10
+ const {
15
11
  navTheme
16
- } = settings;
12
+ } = settings || {};
13
+ const currentRoute = location?.pathname || '/';
14
+ const {
15
+ regions = {}
16
+ } = settings?.routeSettings?.[currentRoute] || {};
17
+ const [isHeaderExpanded, setIsHeaderExpanded] = React.useState(false);
18
+ const [isBackgroundExpanded, setIsBackgroundExpanded] = React.useState(true);
19
+ const [activeBackgroundTab, setActiveBackgroundTab] = React.useState('desktop');
20
+ const [activeHeaderTab, setActiveHeaderTab] = React.useState('desktop');
21
+ const {
22
+ isMobile
23
+ } = useMediaQuery();
24
+ const scrollThresholdConfig = JSON.parse(config.SCROLL_THRESHOLD);
25
+ const deviceType = isMobile ? 'mobile' : 'desktop';
26
+ const handleRegionChange = (key, value) => {
27
+ if (!changeSetting) return;
28
+ changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.header`, {
29
+ ...regions[deviceType]?.header,
30
+ [key]: value
31
+ });
32
+ };
33
+ const handleRegionFooterChange = (key, value) => {
34
+ if (!changeSetting) return;
35
+ changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.footer`, {
36
+ ...regions[deviceType]?.footer,
37
+ [key]: value
38
+ });
39
+ };
40
+ const handleBackgroundChange = (property, value) => {
41
+ if (!changeSetting) return;
42
+ changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.background`, {
43
+ ...regions[deviceType].background,
44
+ [property]: value
45
+ });
46
+ };
47
+ const handleHeaderChange = (element, value) => {
48
+ if (!changeSetting) return;
49
+ changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.header`, {
50
+ ...regions[deviceType]?.header,
51
+ [element]: value
52
+ });
53
+ };
54
+ const header = regions[deviceType]?.header;
55
+ const background = regions[deviceType]?.background;
56
+ // Helper function to render background settings based on current active tab
57
+ const renderBackgroundSettings = () => {
58
+ return jsxs(Fragment, {
59
+ children: [jsxs("div", {
60
+ className: "mb-4",
61
+ children: [jsx("p", {
62
+ className: "font-medium mb-2",
63
+ style: {
64
+ color: navTheme === 'dark' ? '#ffff' : 'black'
65
+ },
66
+ children: t('background_type')
67
+ }), jsxs("div", {
68
+ className: "flex mb-3 rounded-lg overflow-hidden border border-gray-200 divide-x divide-gray-200 bg-gray-50",
69
+ children: [jsxs("button", {
70
+ className: `flex-1 py-2 px-3 text-sm font-medium transition-colors duration-200 flex items-center justify-center ${background?.type === 'color' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700 hover:bg-gray-100'}`,
71
+ onClick: () => handleBackgroundChange('type', 'color'),
72
+ children: [jsx("span", {
73
+ className: "mr-1",
74
+ children: jsxs("svg", {
75
+ xmlns: "http://www.w3.org/2000/svg",
76
+ width: "16",
77
+ height: "16",
78
+ viewBox: "0 0 24 24",
79
+ fill: "none",
80
+ stroke: "currentColor",
81
+ strokeWidth: "2",
82
+ strokeLinecap: "round",
83
+ strokeLinejoin: "round",
84
+ children: [jsx("circle", {
85
+ cx: "12",
86
+ cy: "12",
87
+ r: "10"
88
+ }), jsx("path", {
89
+ d: "M12 8v8M8 12h8"
90
+ })]
91
+ })
92
+ }), t('color')]
93
+ }), jsxs("button", {
94
+ className: `flex-1 py-2 px-3 text-sm font-medium transition-colors duration-200 flex items-center justify-center ${background?.type === 'image' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700 hover:bg-gray-100'}`,
95
+ onClick: () => handleBackgroundChange('type', 'image'),
96
+ children: [jsx("span", {
97
+ className: "mr-1",
98
+ children: jsxs("svg", {
99
+ xmlns: "http://www.w3.org/2000/svg",
100
+ width: "16",
101
+ height: "16",
102
+ viewBox: "0 0 24 24",
103
+ fill: "none",
104
+ stroke: "currentColor",
105
+ strokeWidth: "2",
106
+ strokeLinecap: "round",
107
+ strokeLinejoin: "round",
108
+ children: [jsx("rect", {
109
+ x: "3",
110
+ y: "3",
111
+ width: "18",
112
+ height: "18",
113
+ rx: "2",
114
+ ry: "2"
115
+ }), jsx("circle", {
116
+ cx: "8.5",
117
+ cy: "8.5",
118
+ r: "1.5"
119
+ }), jsx("polyline", {
120
+ points: "21 15 16 10 5 21"
121
+ })]
122
+ })
123
+ }), t('image')]
124
+ }), jsxs("button", {
125
+ className: `flex-1 py-2 px-3 text-sm font-medium transition-colors duration-200 flex items-center justify-center ${background?.type === 'video' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700 hover:bg-gray-100'}`,
126
+ onClick: () => handleBackgroundChange('type', 'video'),
127
+ children: [jsx("span", {
128
+ className: "mr-1",
129
+ children: jsxs("svg", {
130
+ xmlns: "http://www.w3.org/2000/svg",
131
+ width: "16",
132
+ height: "16",
133
+ viewBox: "0 0 24 24",
134
+ fill: "none",
135
+ stroke: "currentColor",
136
+ strokeWidth: "2",
137
+ strokeLinecap: "round",
138
+ strokeLinejoin: "round",
139
+ children: [jsx("polygon", {
140
+ points: "23 7 16 12 23 17 23 7"
141
+ }), jsx("rect", {
142
+ x: "1",
143
+ y: "5",
144
+ width: "15",
145
+ height: "14",
146
+ rx: "2",
147
+ ry: "2"
148
+ })]
149
+ })
150
+ }), t('video')]
151
+ })]
152
+ })]
153
+ }), background?.type === 'color' && jsxs("div", {
154
+ className: "mb-4",
155
+ children: [jsx("p", {
156
+ className: "mb-2",
157
+ style: {
158
+ color: navTheme === 'dark' ? '#ffff' : 'black'
159
+ },
160
+ children: t('background_color')
161
+ }), jsxs("div", {
162
+ className: "flex items-center",
163
+ children: [jsx("div", {
164
+ className: "w-12 h-12 rounded-lg border border-gray-300 mr-3 flex-shrink-0 shadow-sm",
165
+ style: {
166
+ backgroundColor: background?.color === 'inherit' ? '#ffffff' : background?.color || '#ffffff'
167
+ }
168
+ }), jsx("div", {
169
+ className: "flex-grow",
170
+ children: jsx("input", {
171
+ type: "color",
172
+ value: background?.color === 'inherit' ? '#ffffff' : background?.color || '#ffffff',
173
+ onChange: e => handleBackgroundChange('color', e.target.value),
174
+ className: "w-full h-10 rounded cursor-pointer"
175
+ })
176
+ })]
177
+ }), jsx("div", {
178
+ className: "flex flex-wrap gap-2 mt-3",
179
+ children: ['#ffffff', '#f2f2f2', '#e6e6e6', '#1890ff', '#52c41a', '#faad14', '#f5222d', '#722ed1'].map(color => jsx("button", {
180
+ className: `w-8 h-8 rounded-full border ${color === (background?.color || '#ffffff') ? 'border-blue-500 border-2' : 'border-gray-300'}`,
181
+ style: {
182
+ backgroundColor: color
183
+ },
184
+ onClick: () => handleBackgroundChange('color', color),
185
+ "aria-label": `Select color ${color}`
186
+ }, color))
187
+ })]
188
+ }), background?.type === 'image' && jsxs("div", {
189
+ className: "mb-2",
190
+ children: [jsx("div", {
191
+ className: "flex items-center mb-1",
192
+ children: jsx("p", {
193
+ style: {
194
+ color: navTheme === 'dark' ? '#ffff' : 'black'
195
+ },
196
+ children: t('image_url')
197
+ })
198
+ }), jsx("input", {
199
+ type: "text",
200
+ placeholder: t('image_url'),
201
+ value: background?.image || '',
202
+ onChange: e => handleBackgroundChange('image', e.target.value),
203
+ className: "w-full p-1 text-sm border border-gray-300 rounded"
204
+ }), background?.image && jsx("div", {
205
+ className: "mt-2 p-1 border border-gray-300 rounded",
206
+ children: jsx("img", {
207
+ src: background?.image,
208
+ alt: "Background preview",
209
+ className: "w-full h-24 object-cover",
210
+ onError: e => {
211
+ const target = e.target;
212
+ target.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjMiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGNpcmNsZSBjeD0iOC41IiBjeT0iOC41IiByPSIxLjUiPjwvY2lyY2xlPjxwb2x5bGluZSBwb2ludHM9IjIxIDEzLjg1IDE2IDEwLjk4IDgiIDE1Ij48L3BvbHlsaW5lPjwvc3ZnPg==';
213
+ }
214
+ })
215
+ })]
216
+ }), background?.type === 'video' && jsxs("div", {
217
+ className: "mb-2",
218
+ children: [jsx("div", {
219
+ className: "flex items-center mb-1",
220
+ children: jsx("p", {
221
+ style: {
222
+ color: navTheme === 'dark' ? '#ffff' : 'black'
223
+ },
224
+ children: t('video_url')
225
+ })
226
+ }), jsx("input", {
227
+ type: "text",
228
+ placeholder: t('video_url'),
229
+ value: background?.video || '',
230
+ onChange: e => handleBackgroundChange('video', e.target.value),
231
+ className: "w-full p-1 text-sm border border-gray-300 rounded"
232
+ }), jsx("div", {
233
+ className: "flex items-center mt-3 mb-1",
234
+ children: jsx("p", {
235
+ style: {
236
+ color: navTheme === 'dark' ? '#ffff' : 'black'
237
+ },
238
+ children: t('video_thumbnail')
239
+ })
240
+ }), jsx("input", {
241
+ type: "text",
242
+ placeholder: t('video_thumbnail'),
243
+ value: background?.videoThumbnail || '',
244
+ onChange: e => handleBackgroundChange('videoThumbnail', e.target.value),
245
+ className: "w-full p-1 text-sm border border-gray-300 rounded"
246
+ }), jsx("div", {
247
+ className: "flex flex-wrap gap-2 mt-3",
248
+ children: !background?.video && background?.videoThumbnail && jsx("div", {
249
+ className: "mt-2 p-1 border border-gray-300 rounded w-full",
250
+ children: jsx("img", {
251
+ src: background?.videoThumbnail,
252
+ alt: "Video thumbnail preview",
253
+ className: "w-full h-24 object-cover",
254
+ onError: e => {
255
+ const target = e.target;
256
+ target.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwb2x5Z29uIHBvaW50cz0iMjMgNyAxNiAxMiAyMyAxNyAyMyA3Ij48L3BvbHlnb24+PHJlY3QgeD0iMSIgeT0iNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE0IiByeD0iMiIgcnk9IjIiPjwvcmVjdD48L3N2Zz4=';
257
+ }
258
+ })
259
+ })
260
+ })]
261
+ })]
262
+ });
263
+ };
264
+ // Helper function to render header settings based on current active tab
265
+ const renderHeaderSettings = () => {
266
+ const isDesktop = activeHeaderTab === 'desktop';
267
+ return jsxs("div", {
268
+ className: "space-y-2",
269
+ children: [jsxs("div", {
270
+ className: "flex items-center",
271
+ children: [jsx("p", {
272
+ style: {
273
+ color: navTheme === 'dark' ? '#ffff' : 'black'
274
+ },
275
+ children: t('show_header')
276
+ }), jsx("div", {
277
+ className: "flex-grow"
278
+ }), jsx(Switch, {
279
+ value: isDesktop ? regions.desktop?.header?.showHeader ?? true : regions.mobile?.header?.showHeader ?? true,
280
+ onChange: checked => handleHeaderChange('showHeader', checked)
281
+ })]
282
+ }), jsxs("div", {
283
+ className: "flex items-center",
284
+ children: [jsx("p", {
285
+ style: {
286
+ color: navTheme === 'dark' ? '#ffff' : 'black'
287
+ },
288
+ children: t('fixed_header')
289
+ }), jsx("div", {
290
+ className: "flex-grow"
291
+ }), jsx(Switch, {
292
+ value: header?.fixedHeader,
293
+ onChange: checked => handleHeaderChange('fixedHeader', checked)
294
+ })]
295
+ }), jsxs("div", {
296
+ className: "flex items-center",
297
+ children: [jsx("p", {
298
+ style: {
299
+ color: navTheme === 'dark' ? '#ffff' : 'black'
300
+ },
301
+ children: t('show_logo')
302
+ }), jsx("div", {
303
+ className: "flex-grow"
304
+ }), jsx(Switch, {
305
+ value: header?.showLogo,
306
+ onChange: checked => handleHeaderChange('showLogo', checked)
307
+ })]
308
+ }), jsxs("div", {
309
+ className: "flex items-center",
310
+ children: [jsx("p", {
311
+ style: {
312
+ color: navTheme === 'dark' ? '#ffff' : 'black'
313
+ },
314
+ children: t('show_search_slot')
315
+ }), jsx("div", {
316
+ className: "flex-grow"
317
+ }), jsx(Switch, {
318
+ value: header?.showSearchSlot,
319
+ onChange: checked => handleHeaderChange('showSearchSlot', checked)
320
+ })]
321
+ }), jsxs("div", {
322
+ className: "flex items-center",
323
+ children: [jsx("p", {
324
+ style: {
325
+ color: navTheme === 'dark' ? '#ffff' : 'black'
326
+ },
327
+ children: t('show_right_content')
328
+ }), jsx("div", {
329
+ className: "flex-grow"
330
+ }), jsx(Switch, {
331
+ value: header?.showRightContent,
332
+ onChange: checked => handleHeaderChange('showRightContent', checked)
333
+ })]
334
+ }), jsxs("div", {
335
+ className: "flex items-center",
336
+ children: [jsx("p", {
337
+ style: {
338
+ color: navTheme === 'dark' ? '#ffff' : 'black'
339
+ },
340
+ children: t('show_menu_toggle')
341
+ }), jsx("div", {
342
+ className: "flex-grow"
343
+ }), jsx(Switch, {
344
+ value: header?.showMenuToggle,
345
+ onChange: checked => handleHeaderChange('showMenuToggle', checked)
346
+ })]
347
+ }), jsxs("div", {
348
+ className: "flex items-center",
349
+ children: [jsx("p", {
350
+ style: {
351
+ color: navTheme === 'dark' ? '#ffff' : 'black'
352
+ },
353
+ children: t('show_back_button')
354
+ }), jsx("div", {
355
+ className: "flex-grow"
356
+ }), jsx(Switch, {
357
+ value: header?.showBackButton,
358
+ onChange: checked => handleHeaderChange('showBackButton', checked)
359
+ })]
360
+ }), jsxs("div", {
361
+ className: "flex items-center",
362
+ children: [jsx("p", {
363
+ style: {
364
+ color: navTheme === 'dark' ? '#ffff' : 'black'
365
+ },
366
+ children: t('show_page_title')
367
+ }), jsx("div", {
368
+ className: "flex-grow"
369
+ }), jsx(Switch, {
370
+ value: header?.showPageTitle,
371
+ onChange: checked => handleHeaderChange('showPageTitle', checked)
372
+ })]
373
+ }), jsxs("div", {
374
+ className: "flex items-center",
375
+ children: [jsx("p", {
376
+ style: {
377
+ color: navTheme === 'dark' ? '#ffff' : 'black'
378
+ },
379
+ children: t('show_action_buttons')
380
+ }), jsx("div", {
381
+ className: "flex-grow"
382
+ }), jsx(Switch, {
383
+ value: header?.showActionButtons,
384
+ onChange: checked => handleHeaderChange('showActionButtons', checked)
385
+ })]
386
+ })]
387
+ });
388
+ };
389
+ // Helper function to render search bar settings based on current active tab
390
+ const renderSearchBarSettings = () => {
391
+ return jsxs("div", {
392
+ className: "space-y-2",
393
+ children: [jsxs("div", {
394
+ className: "flex items-center",
395
+ children: [jsx("p", {
396
+ style: {
397
+ color: navTheme === 'dark' ? '#ffff' : 'black'
398
+ },
399
+ children: t('search_bar')
400
+ }), jsx("div", {
401
+ className: "flex-grow"
402
+ }), jsx(Switch, {
403
+ value: header?.searchBarRender,
404
+ onChange: checked => handleHeaderChange('searchBarRender', checked)
405
+ })]
406
+ }), jsxs("div", {
407
+ className: "flex items-center",
408
+ children: [jsx("p", {
409
+ style: {
410
+ color: navTheme === 'dark' ? '#ffff' : 'black'
411
+ },
412
+ children: t('search_bar_on_scroll')
413
+ }), jsx("div", {
414
+ className: "flex-grow"
415
+ }), jsx(Switch, {
416
+ value: header?.searchBarBehavior === SearchBarBehavior.ON_SCROLL,
417
+ onChange: checked => handleHeaderChange('searchBarBehavior', checked ? SearchBarBehavior.ON_SCROLL : SearchBarBehavior.PERMANENT)
418
+ })]
419
+ }), jsxs("div", {
420
+ className: "flex items-center",
421
+ children: [jsx("p", {
422
+ style: {
423
+ color: navTheme === 'dark' ? '#ffff' : 'black'
424
+ },
425
+ children: t('search_bar_overlay')
426
+ }), jsx("div", {
427
+ className: "flex-grow"
428
+ }), jsx(Switch, {
429
+ value: header?.searchBarOverlay,
430
+ onChange: checked => handleHeaderChange('searchBarOverlay', checked)
431
+ })]
432
+ }), jsxs("div", {
433
+ className: "mb-4",
434
+ children: [jsxs("div", {
435
+ className: "flex items-center justify-between mb-2",
436
+ children: [jsx("p", {
437
+ style: {
438
+ color: navTheme === 'dark' ? '#ffff' : 'black'
439
+ },
440
+ children: t('scroll_threshold')
441
+ }), jsxs("span", {
442
+ className: "text-sm",
443
+ style: {
444
+ color: navTheme === 'dark' ? '#ffff' : 'black'
445
+ },
446
+ children: [header?.scrollThreshold || scrollThresholdConfig.DEFAULT, "px"]
447
+ })]
448
+ }), jsxs("div", {
449
+ className: "relative",
450
+ children: [jsx("input", {
451
+ type: "range",
452
+ min: scrollThresholdConfig.MIN,
453
+ max: scrollThresholdConfig.MAX,
454
+ step: scrollThresholdConfig.STEP,
455
+ value: header?.scrollThreshold || scrollThresholdConfig.DEFAULT,
456
+ onChange: e => handleHeaderChange('scrollThreshold', parseInt(e.target.value)),
457
+ className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"
458
+ }), jsxs("div", {
459
+ className: "flex justify-between text-xs mt-2",
460
+ children: [jsxs("span", {
461
+ children: [scrollThresholdConfig.MIN, "px"]
462
+ }), jsxs("span", {
463
+ children: [scrollThresholdConfig.MAX / 2, "px"]
464
+ }), jsxs("span", {
465
+ children: [scrollThresholdConfig.MAX, "px"]
466
+ })]
467
+ })]
468
+ })]
469
+ })]
470
+ });
471
+ };
17
472
  return jsxs("div", {
18
473
  children: [jsxs("div", {
19
- className: "flex items-center mb-2",
20
- children: [jsx("p", {
21
- style: {
22
- color: navTheme == 'dark' ? '#ffff' : 'black'
23
- },
24
- children: t('header')
474
+ children: [jsx("div", {
475
+ className: "flex items-center mb-2",
476
+ children: jsxs("button", {
477
+ onClick: () => setIsBackgroundExpanded(!isBackgroundExpanded),
478
+ className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200",
479
+ children: [jsx("svg", {
480
+ className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isBackgroundExpanded ? 'rotate-180' : ''}`,
481
+ fill: "none",
482
+ stroke: "currentColor",
483
+ viewBox: "0 0 24 24",
484
+ children: jsx("path", {
485
+ strokeLinecap: "round",
486
+ strokeLinejoin: "round",
487
+ strokeWidth: 2,
488
+ d: "M19 9l-7 7-7-7"
489
+ })
490
+ }), jsx("p", {
491
+ style: {
492
+ color: navTheme === 'dark' ? '#ffff' : 'black'
493
+ },
494
+ children: t('background')
495
+ })]
496
+ })
25
497
  }), jsx("div", {
26
- className: "flex-grow"
27
- }), jsx(Switch, {
28
- settings: settings,
29
- value: showHeader || showHeader === undefined,
30
- changeSetting: changeSetting,
31
- settingKey: "showHeader"
498
+ className: `grid transition-all duration-300 ease-in-out ${isBackgroundExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`,
499
+ children: jsx("div", {
500
+ className: "overflow-hidden",
501
+ children: jsxs("div", {
502
+ className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4",
503
+ children: [jsxs("div", {
504
+ className: "flex mb-4 mt-1",
505
+ children: [jsx("button", {
506
+ className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-l-lg border border-r-0 border-gray-300 ${activeBackgroundTab === 'desktop' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
507
+ onClick: () => setActiveBackgroundTab('desktop'),
508
+ children: jsxs("span", {
509
+ className: "flex items-center justify-center",
510
+ children: [jsxs("svg", {
511
+ xmlns: "http://www.w3.org/2000/svg",
512
+ width: "16",
513
+ height: "16",
514
+ viewBox: "0 0 24 24",
515
+ fill: "none",
516
+ stroke: "currentColor",
517
+ strokeWidth: "2",
518
+ strokeLinecap: "round",
519
+ strokeLinejoin: "round",
520
+ className: "mr-1",
521
+ children: [jsx("rect", {
522
+ x: "2",
523
+ y: "3",
524
+ width: "20",
525
+ height: "14",
526
+ rx: "2",
527
+ ry: "2"
528
+ }), jsx("line", {
529
+ x1: "8",
530
+ y1: "21",
531
+ x2: "16",
532
+ y2: "21"
533
+ }), jsx("line", {
534
+ x1: "12",
535
+ y1: "17",
536
+ x2: "12",
537
+ y2: "21"
538
+ })]
539
+ }), t('desktop_tab')]
540
+ })
541
+ }), jsx("button", {
542
+ className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-r-lg border border-gray-300 ${activeBackgroundTab === 'mobile' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
543
+ onClick: () => setActiveBackgroundTab('mobile'),
544
+ children: jsxs("span", {
545
+ className: "flex items-center justify-center",
546
+ children: [jsxs("svg", {
547
+ xmlns: "http://www.w3.org/2000/svg",
548
+ width: "16",
549
+ height: "16",
550
+ viewBox: "0 0 24 24",
551
+ fill: "none",
552
+ stroke: "currentColor",
553
+ strokeWidth: "2",
554
+ strokeLinecap: "round",
555
+ strokeLinejoin: "round",
556
+ className: "mr-1",
557
+ children: [jsx("rect", {
558
+ x: "5",
559
+ y: "2",
560
+ width: "14",
561
+ height: "20",
562
+ rx: "2",
563
+ ry: "2"
564
+ }), jsx("line", {
565
+ x1: "12",
566
+ y1: "18",
567
+ x2: "12",
568
+ y2: "18"
569
+ })]
570
+ }), t('mobile_tab')]
571
+ })
572
+ })]
573
+ }), jsx("div", {
574
+ className: "mb-4",
575
+ children: renderBackgroundSettings()
576
+ })]
577
+ })
578
+ })
32
579
  })]
33
580
  }), jsxs("div", {
34
- className: "flex items-center mb-2",
35
- children: [jsx("p", {
36
- style: {
37
- color: navTheme == 'dark' ? '#ffff' : 'black'
38
- },
39
- children: t('footer')
581
+ children: [jsx("div", {
582
+ className: "flex items-center mb-2",
583
+ children: jsxs("button", {
584
+ onClick: () => setIsHeaderExpanded(!isHeaderExpanded),
585
+ className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200",
586
+ children: [jsx("svg", {
587
+ className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isHeaderExpanded ? 'rotate-180' : ''}`,
588
+ fill: "none",
589
+ stroke: "currentColor",
590
+ viewBox: "0 0 24 24",
591
+ children: jsx("path", {
592
+ strokeLinecap: "round",
593
+ strokeLinejoin: "round",
594
+ strokeWidth: 2,
595
+ d: "M19 9l-7 7-7-7"
596
+ })
597
+ }), jsx("p", {
598
+ style: {
599
+ color: navTheme === 'dark' ? '#ffff' : 'black'
600
+ },
601
+ children: t('header')
602
+ })]
603
+ })
40
604
  }), jsx("div", {
41
- className: "flex-grow"
42
- }), jsx(Switch, {
43
- settings: settings,
44
- value: showFooter || showFooter === undefined,
45
- changeSetting: changeSetting,
46
- settingKey: "showFooter"
605
+ className: `grid transition-all duration-300 ease-in-out ${isHeaderExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`,
606
+ children: jsx("div", {
607
+ className: "overflow-hidden",
608
+ children: jsxs("div", {
609
+ className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4",
610
+ children: [jsxs("div", {
611
+ className: "flex mb-4 mt-1",
612
+ children: [jsx("button", {
613
+ className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-l-lg border border-r-0 border-gray-300 ${activeHeaderTab === 'desktop' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
614
+ onClick: () => setActiveHeaderTab('desktop'),
615
+ children: jsxs("span", {
616
+ className: "flex items-center justify-center",
617
+ children: [jsxs("svg", {
618
+ xmlns: "http://www.w3.org/2000/svg",
619
+ width: "16",
620
+ height: "16",
621
+ viewBox: "0 0 24 24",
622
+ fill: "none",
623
+ stroke: "currentColor",
624
+ strokeWidth: "2",
625
+ strokeLinecap: "round",
626
+ strokeLinejoin: "round",
627
+ className: "mr-1",
628
+ children: [jsx("rect", {
629
+ x: "2",
630
+ y: "3",
631
+ width: "20",
632
+ height: "14",
633
+ rx: "2",
634
+ ry: "2"
635
+ }), jsx("line", {
636
+ x1: "8",
637
+ y1: "21",
638
+ x2: "16",
639
+ y2: "21"
640
+ }), jsx("line", {
641
+ x1: "12",
642
+ y1: "17",
643
+ x2: "12",
644
+ y2: "21"
645
+ })]
646
+ }), t('desktop_tab')]
647
+ })
648
+ }), jsx("button", {
649
+ className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-r-lg border border-gray-300 ${activeHeaderTab === 'mobile' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
650
+ onClick: () => setActiveHeaderTab('mobile'),
651
+ children: jsxs("span", {
652
+ className: "flex items-center justify-center",
653
+ children: [jsxs("svg", {
654
+ xmlns: "http://www.w3.org/2000/svg",
655
+ width: "16",
656
+ height: "16",
657
+ viewBox: "0 0 24 24",
658
+ fill: "none",
659
+ stroke: "currentColor",
660
+ strokeWidth: "2",
661
+ strokeLinecap: "round",
662
+ strokeLinejoin: "round",
663
+ className: "mr-1",
664
+ children: [jsx("rect", {
665
+ x: "5",
666
+ y: "2",
667
+ width: "14",
668
+ height: "20",
669
+ rx: "2",
670
+ ry: "2"
671
+ }), jsx("line", {
672
+ x1: "12",
673
+ y1: "18",
674
+ x2: "12",
675
+ y2: "18"
676
+ })]
677
+ }), t('mobile_tab')]
678
+ })
679
+ })]
680
+ }), jsx("div", {
681
+ className: "mb-4",
682
+ children: renderHeaderSettings()
683
+ }), jsxs("div", {
684
+ className: "mt-6 mb-4",
685
+ children: [jsx("p", {
686
+ className: "font-medium mb-2",
687
+ style: {
688
+ color: navTheme === 'dark' ? '#ffff' : 'black'
689
+ },
690
+ children: t('search_bar')
691
+ }), jsx("div", {
692
+ className: "pl-4 space-y-2",
693
+ children: renderSearchBarSettings()
694
+ })]
695
+ })]
696
+ })
697
+ })
47
698
  })]
48
699
  }), jsxs("div", {
49
700
  className: "flex items-center mb-2",
50
701
  children: [jsx("p", {
51
702
  style: {
52
- color: navTheme == 'dark' ? '#ffff' : 'black'
703
+ color: navTheme === 'dark' ? '#ffff' : 'black'
53
704
  },
54
- children: t('search_bar')
705
+ children: t('footer')
55
706
  }), jsx("div", {
56
707
  className: "flex-grow"
57
708
  }), jsx(Switch, {
58
- settings: settings,
59
- value: searchBarRender || searchBarRender === undefined,
60
- changeSetting: changeSetting,
61
- settingKey: "searchBarRender"
709
+ value: regions[deviceType]?.footer?.showFooter,
710
+ onChange: checked => handleRegionFooterChange('showFooter', checked)
62
711
  })]
63
712
  }), jsxs("div", {
64
713
  className: "flex items-center mb-2",
65
714
  children: [jsx("p", {
66
715
  style: {
67
- color: navTheme == 'dark' ? '#ffff' : 'black'
716
+ color: navTheme === 'dark' ? '#ffff' : 'black'
68
717
  },
69
718
  children: t('menu')
70
719
  }), jsx("div", {
71
720
  className: "flex-grow"
72
721
  }), jsx(Switch, {
73
- settings: settings,
74
- value: showMenu || showMenu === undefined,
75
- changeSetting: changeSetting,
76
- settingKey: "showMenu"
722
+ value: regions[deviceType]?.header?.showMenu,
723
+ onChange: checked => handleRegionChange('showMenu', checked)
77
724
  })]
78
725
  }), jsxs("div", {
79
726
  className: "flex items-center mb-2",
80
727
  children: [jsx("p", {
81
728
  style: {
82
- color: navTheme == 'dark' ? '#ffff' : 'black'
729
+ color: navTheme === 'dark' ? '#ffff' : 'black'
83
730
  },
84
731
  children: t('menu_header')
85
732
  }), jsx("div", {
86
733
  className: "flex-grow"
87
734
  }), jsx(Switch, {
88
- settings: settings,
89
- value: menuHeaderRender || menuHeaderRender === undefined,
90
- changeSetting: changeSetting,
91
- settingKey: "menuHeaderRender"
735
+ value: regions[deviceType]?.header?.menuHeaderRender,
736
+ onChange: checked => handleRegionChange('menuHeaderRender', checked)
92
737
  })]
93
738
  })]
94
739
  });