import{n as e,t}from"./index-_dGt2VRU.js";import{D as n}from"./jobs-EDHsxG3Q.js";import{t as r}from"./volumes-1SC8XzTm.js";function i({director:e,storagesTab:t,storagesScopeDirector:n,volumeName:r,volumeQuery:i}={}){let a=c(i);return e&&!a.director&&(a.director=e),r&&!a.volumeName&&(a.volumeName=r),t&&t!==`pools`&&!a.storagesTab&&(a.storagesTab=t),n&&!a.storagesScopeDirector&&(a.storagesScopeDirector=n),a}function a({director:e,poolName:t,volumeName:n,poolQuery:r}={}){let i=c(r);return e&&(i.director=e),t&&(i.poolName=t),n?i.volumeName=n:delete i.volumeName,i}function o(e){return typeof e?.volumeName!=`string`||!e.volumeName?null:{name:e.volumeName}}function s(e){let t=typeof e?.storagesScopeDirector==`string`?e.storagesScopeDirector:``,n=typeof e?.storagesTab==`string`?e.storagesTab:``;return!n&&!t?null:{tab:n||`pools`,scopeDirector:t}}function c(i){let a={...n(i),...r({director:typeof i?.director==`string`?i.director:``,directorTab:typeof i?.directorTab==`string`?i.directorTab:``,directorTarget:typeof i?.directorTarget==`string`?i.directorTarget:``,jobId:typeof i?.jobId==`string`?i.jobId:``,poolName:typeof i?.poolName==`string`?i.poolName:``})};return typeof i?.volumeName==`string`&&i.volumeName&&(a.volumeName=i.volumeName),typeof i?.storagesTab==`string`&&i.storagesTab&&i.storagesTab!==`pools`&&(a.storagesTab=i.storagesTab),typeof i?.storagesScopeDirector==`string`&&i.storagesScopeDirector&&(a.storagesScopeDirector=i.storagesScopeDirector),typeof i?.autochangerStorage==`string`&&i.autochangerStorage&&(a[e]=i[e]),typeof i?.autochangerDirector==`string`&&i.autochangerDirector&&(a[t]=i[t]),a}export{c as a,o as i,a as n,s as r,i as t};