/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@axelor/aos-mobile-hr@9.0.7/lib/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
import{getTypes,showToastMessage}from"@axelor/aos-mobile-core";import enTranslations from"./i18n/en.json";import frTranslations from"./i18n/fr.json";import ExpenseScreens from"./screens/expense";import TimesheetScreens from"./screens/timesheet";import LeaveScreens from"./screens/leaveRequests";import{hr_modelAPI,hr_searchFields,hr_sortFields,hr_formsRegister,hr_typeObjects}from"./models";import*as hrReducers from"./features";import{useHrHeaders}from"./hooks/use-hr-header-actions";import{updateTimerStatus}from"./features/timerSlice";import{fetchActiveTimer}from"./api/timer-api";export const HrModule={name:"app-hr",title:"Hr_HumanRessources",subtitle:"Hr_Hr",icon:"diagram-3-fill",compatibilityAOS:{moduleName:"axelor-human-resource",downToVersion:"7.2.0"},translations:{en:enTranslations,fr:frTranslations},menus:{hr_menu_timesheetsSeparator:{title:"Hr_Timesheets",separator:!0},hr_menu_activeTimer:{title:"Hr_ActiveTimer",icon:"stopwatch",screen:"ActiveTimerFormScreen",compatibilityAOS:{moduleName:"axelor-human-resource",downToVersion:"8.0.0"},hideIf:e=>!e.timesheet?.enableTimer},hr_menu_timers:{title:"Hr_Timers",icon:"hourglass-split",screen:"TimerListScreen",compatibilityAOS:{moduleName:"axelor-human-resource",downToVersion:"8.0.0"},hideIf:e=>!e.timesheet?.isMultipleTimerEnabled||!e.timesheet?.enableTimer},hr_menu_timesheets:{title:"Hr_Timesheets",icon:"clock-history",screen:"TimesheetListScreen",compatibilityAOS:{moduleName:"axelor-human-resource",downToVersion:"8.0.0"}},hr_menu_expensesSeparator:{title:"Hr_Expenses",separator:!0},hr_menu_expenseLines:{title:"Hr_ExpenseLines",icon:"receipt",screen:"ExpenseLinesListScreen"},hr_menu_expenses:{title:"Hr_Expenses",icon:"credit-card-fill",screen:"ExpenseListScreen"},hr_menu_leaveRequestsSeparator:{title:"Hr_LeaveRequests",separator:!0},hr_menu_leaves:{title:"Hr_Leaves",icon:"suitcase-fill",screen:"LeaveListScreen",compatibilityAOS:{moduleName:"axelor-human-resource",downToVersion:"8.3.0"}},hr_menu_completeRequest:{title:"Hr_CompleteRequest",icon:"plus-lg",screen:"CompleteRequestScreen",compatibilityAOS:{moduleName:"axelor-human-resource",downToVersion:"8.3.0"}}},screens:{...ExpenseScreens,...TimesheetScreens,...LeaveScreens},reducers:{...hrReducers},models:{objectFields:{...hr_modelAPI},sortFields:{...hr_sortFields},searchFields:{...hr_searchFields},formsRegister:{...hr_formsRegister},headerRegisters:useHrHeaders,typeObjects:hr_typeObjects},requiredConfig:["AppExpense","AppTimesheet"],globalTools:[{key:"hr_activeTimer",iconName:"stopwatch-fill",title:"Hr_UpdateActiveTimer",onPress:async({dispatch:e,navigation:r,storeState:s,translator:t})=>{const i=s?.user?.user?.id,o=await fetchActiveTimer({userId:i}).then((e=>e?.data?.data?.[0]));if(null!=o?.id){const r=o?.statusSelect===getTypes()?.Timer?.statusSelect?.Start;e(updateTimerStatus({userId:i,timerId:o.id,version:o.version,toStatus:r?"pause":"start"}))}else showToastMessage({position:"bottom",type:"error",text1:t("Base_Error"),text2:t("Hr_TimerTool_NoTimerFound"),onPress:()=>r.navigate("ActiveTimerFormScreen")})},hideIf:({storeState:e})=>!e?.appConfig?.timesheet?.enableTimer}]};export*from"./api";export*from"./components";export*from"./features/asyncFunctions-index";export*from"./screens/expense";export*from"./screens/timesheet";export*from"./screens/leaveRequests";export*from"./types";export*from"./utils";
//# sourceMappingURL=/sm/707877d919c7a20a5431aa9ba925699d43dccd71c82969d85e6c1bbd68f25b3d.map