require("../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../../../../locales/index.js");
const require_venueWallUtils = require("../ResourceWall/venueWallUtils.js");
let _pisell_utils = require("@pisell/utils");
//#region src/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.ts
/** 与 Quick Filter 同源：优先 utils，若 utils 返回 key（未命中）则用 materials 再回退 */
function getSortButtonText() {
	const key = "pisell2.recordBoard.toolbar.sort";
	const u = _pisell_utils.locales.getText(key);
	return u && u !== key ? u : require_index.getText(key) || require_index.getText("sort-button-text");
}
/** 资源墙无状态列派生项时注入：下拉仅「状态 → 空闲优先 / 占用优先」，仍渲染排序按钮 */
function buildResourceWallStatusSortFallbackItem(sortConfig) {
	const extras = typeof sortConfig === "object" && sortConfig !== null && Array.isArray(sortConfig.resourceWallSortFieldKeys) ? sortConfig.resourceWallSortFieldKeys.map((x) => String(x).trim()).filter(Boolean) : [];
	const primaryKey = extras.length > 0 ? extras[0] : require_venueWallUtils.DEFAULT_RESOURCE_WALL_STATUS_SORT_FIELD_KEYS[0];
	return {
		name: primaryKey,
		label: require_index.getText("pisell2.recordBoard.toolbar.sortStatus"),
		isCustom: true,
		getSortItems: () => [{
			key: `${primaryKey}:asc:option`,
			label: require_index.getText("pisell2.recordBoard.toolbar.sortStatusFreeFirst")
		}, {
			key: `${primaryKey}:desc:option`,
			label: require_index.getText("pisell2.recordBoard.toolbar.sortStatusOccupiedFirst")
		}]
	};
}
function getViewGridLabel() {
	const key = "pisell2.recordBoard.toolbar.viewGrid";
	const u = _pisell_utils.locales.getText(key);
	return u && u !== key ? u : require_index.getText(key) || "Table";
}
function getViewFloorMapLabel() {
	const key = "pisell2.recordBoard.toolbar.viewFloorMap";
	const u = _pisell_utils.locales.getText(key);
	return u && u !== key ? u : require_index.getText(key) || "Floor map";
}
function getViewCalendarLabel() {
	const key = "pisell2.recordBoard.toolbar.viewCalendar";
	const u = _pisell_utils.locales.getText(key);
	return u && u !== key ? u : require_index.getText(key) || "Calendar";
}
function getViewResourceWallLabel() {
	const key = "pisell2.recordBoard.toolbar.viewResourceWall";
	const u = _pisell_utils.locales.getText(key);
	return u && u !== key ? u : require_index.getText(key) || "Wall";
}
/** 筛选无值时使用的默认筛选项；业务可通过 childComponentProps.toolBar.filter.defaultFilterValue 覆盖 */
function getDefaultFilterValue() {
	return {
		quickFilter: [],
		otherFilter: []
	};
}
//#endregion
exports.buildResourceWallStatusSortFallbackItem = buildResourceWallStatusSortFallbackItem;
exports.getDefaultFilterValue = getDefaultFilterValue;
exports.getSortButtonText = getSortButtonText;
exports.getViewCalendarLabel = getViewCalendarLabel;
exports.getViewFloorMapLabel = getViewFloorMapLabel;
exports.getViewGridLabel = getViewGridLabel;
exports.getViewResourceWallLabel = getViewResourceWallLabel;
