import{MenuItem_default as e,TextField_default as t,jsx as n,useAppSelector as r}from"./index-BlKb1bsp.js";const i=({value:i,onChange:a,rootTypeIdFilter:o,contains:s=``,locationIds:c,excludeLocationTypeIds:l,label:u=`Location`,disabled:d=!1,error:f=``})=>{let p=r(e=>{var t;return(t=e.common.lookupTables)?.locations}),m=Object.values(p??{});return n(t,{select:!0,style:{minWidth:100,width:`100%`,maxWidth:`100%`},variant:`outlined`,fullWidth:!0,disabled:d,label:u,value:i,onChange:a,error:!!f,helperText:f,children:m&&m.filter(e=>e.rootTypeId!==o||c&&!c.includes(e.locationId)||l&&l.includes(e.locationTypeId)?!1:!(s&&!e.locationName.includes(s))).map(t=>n(e,{value:t.locationId,children:t.locationName},`location/${t.locationId}`))})};export{i as LocationSelector};
//# sourceMappingURL=location-selector-DWfRAf_s.js.map