import{clamp as t}from"./utils.js";import{upgradeFromName as n,EMPTY_UPGRADE as o}from"./upgrades.js";const e="ftb_sd:item_amount",r="ftb_sd:upgrade_",i="ftb_sd:locked",f=7,s="ftb_sd:display",u="ftb_sd:void";function l(t){let n=0;for(let o=0;o<f;o++){const e=c(t,o);void 0!==e&&(n+=e.upgradeMultiplier)}return n}function c(e,i){const s=t(i,0,f-1),u=e.getDynamicProperty(`${r} + ${s}`);return"string"==typeof u?n(u):o}function d(n,o,e){const i=t(o,0,f-1),s=c(n,i),u=n.dimension.getBlock(n.location);s.onRemoved(n,u),n.setDynamicProperty(`${r} + ${i}`,e.name),e.onInstalled(n,u)}function m(t){for(let n=0;n<f;n++){if(c(t,n)===o)return n}return 0}function p(t){let n=0;for(let e=0;e<f;e++){c(t,e)!==o&&n++}return n}function a(t,n){let o=0;for(let e=0;e<f;e++){c(t,e)===n&&o++}return o}export{s as DISPLAY_KEY,e as ITEM_COUNT_KEY,i as ITEM_LOCK_KEY,r as ITEM_UPGRADE_BASE_KEY,f as UPGRADE_SLOTS,u as VOID_KEY,a as getAmountOfUpgradeTypes,p as getAmountOfUpgrades,m as getFirstEmptyUpgradeSlot,c as getUpgradeInSlot,l as getUpgradeMultiplier,d as setDrawerUpgrade};
