Files
NapCatQQ/.pnpm-store/v3/files/dd/bcaa9d533ca78d5047bfe30689f5c4b42a866b2b815c5782061f112547de496c74fa597638ad966947e2adfcde54138c1da70b86d1e8601453270214e12144
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

45 lines
2.0 KiB
Plaintext

import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from "./utils.module.js";
import {useDefaultLocale as $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a} from "./useDefaultLocale.module.js";
import $h9FiU$react, {useContext as $h9FiU$useContext} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (0, $h9FiU$react).createContext(null);
function $18f2051aff69b9bf$export$a54013f0d02a8f82(props) {
let { locale: locale, children: children } = props;
let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();
let value = (0, $h9FiU$react).useMemo(()=>{
if (!locale) return defaultLocale;
return {
locale: locale,
direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'
};
}, [
defaultLocale,
locale
]);
return /*#__PURE__*/ (0, $h9FiU$react).createElement($18f2051aff69b9bf$var$I18nContext.Provider, {
value: value
}, children);
}
function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {
let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();
let context = (0, $h9FiU$useContext)($18f2051aff69b9bf$var$I18nContext);
return context || defaultLocale;
}
export {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale};
//# sourceMappingURL=context.module.js.map