import{q as y,a as h}from"./index-CMWG4mbA.js";const t=e=>({url:t.url(e),method:"get"});t.definition={methods:["get","head"],url:"/users"};t.url=e=>t.definition.url+y(e);t.get=e=>({url:t.url(e),method:"get"});t.head=e=>({url:t.url(e),method:"head"});const c=e=>({action:t.url(e),method:"get"});c.get=e=>({action:t.url(e),method:"get"});c.head=e=>({action:t.url({[e?.mergeQuery?"mergeQuery":"query"]:{_method:"HEAD",...e?.query??e?.mergeQuery??{}}}),method:"get"});t.form=c;const u=e=>({url:u.url(e),method:"get"});u.definition={methods:["get","head"],url:"/users/create"};u.url=e=>u.definition.url+y(e);u.get=e=>({url:u.url(e),method:"get"});u.head=e=>({url:u.url(e),method:"head"});const s=e=>({action:u.url(e),method:"get"});s.get=e=>({action:u.url(e),method:"get"});s.head=e=>({action:u.url({[e?.mergeQuery?"mergeQuery":"query"]:{_method:"HEAD",...e?.query??e?.mergeQuery??{}}}),method:"get"});u.form=s;const i=e=>({url:i.url(e),method:"post"});i.definition={methods:["post"],url:"/users"};i.url=e=>i.definition.url+y(e);i.post=e=>({url:i.url(e),method:"post"});const A=e=>({action:i.url(e),method:"post"});A.post=e=>({action:i.url(e),method:"post"});i.form=A;const o=(e,r)=>({url:o.url(e,r),method:"get"});o.definition={methods:["get","head"],url:"/users/{user}"};o.url=(e,r)=>{(typeof e=="string"||typeof e=="number")&&(e={user:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={user:e.id}),Array.isArray(e)&&(e={user:e[0]}),e=h(e);const n={user:typeof e.user=="object"?e.user.id:e.user};return o.definition.url.replace("{user}",n.user.toString()).replace(/\/+$/,"")+y(r)};o.get=(e,r)=>({url:o.url(e,r),method:"get"});o.head=(e,r)=>({url:o.url(e,r),method:"head"});const f=(e,r)=>({action:o.url(e,r),method:"get"});f.get=(e,r)=>({action:o.url(e,r),method:"get"});f.head=(e,r)=>({action:o.url(e,{[r?.mergeQuery?"mergeQuery":"query"]:{_method:"HEAD",...r?.query??r?.mergeQuery??{}}}),method:"get"});o.form=f;const d=(e,r)=>({url:d.url(e,r),method:"get"});d.definition={methods:["get","head"],url:"/users/{user}/edit"};d.url=(e,r)=>{(typeof e=="string"||typeof e=="number")&&(e={user:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={user:e.id}),Array.isArray(e)&&(e={user:e[0]}),e=h(e);const n={user:typeof e.user=="object"?e.user.id:e.user};return d.definition.url.replace("{user}",n.user.toString()).replace(/\/+$/,"")+y(r)};d.get=(e,r)=>({url:d.url(e,r),method:"get"});d.head=(e,r)=>({url:d.url(e,r),method:"head"});const p=(e,r)=>({action:d.url(e,r),method:"get"});p.get=(e,r)=>({action:d.url(e,r),method:"get"});p.head=(e,r)=>({action:d.url(e,{[r?.mergeQuery?"mergeQuery":"query"]:{_method:"HEAD",...r?.query??r?.mergeQuery??{}}}),method:"get"});d.form=p;const m=(e,r)=>({url:m.url(e,r),method:"put"});m.definition={methods:["put"],url:"/users/{user}"};m.url=(e,r)=>{(typeof e=="string"||typeof e=="number")&&(e={user:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={user:e.id}),Array.isArray(e)&&(e={user:e[0]}),e=h(e);const n={user:typeof e.user=="object"?e.user.id:e.user};return m.definition.url.replace("{user}",n.user.toString()).replace(/\/+$/,"")+y(r)};m.put=(e,r)=>({url:m.url(e,r),method:"put"});const Q=(e,r)=>({action:m.url(e,{[r?.mergeQuery?"mergeQuery":"query"]:{_method:"PUT",...r?.query??r?.mergeQuery??{}}}),method:"post"});Q.put=(e,r)=>({action:m.url(e,{[r?.mergeQuery?"mergeQuery":"query"]:{_method:"PUT",...r?.query??r?.mergeQuery??{}}}),method:"post"});m.form=Q;const l=(e,r)=>({url:l.url(e,r),method:"delete"});l.definition={methods:["delete"],url:"/users/{user}"};l.url=(e,r)=>{(typeof e=="string"||typeof e=="number")&&(e={user:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={user:e.id}),Array.isArray(e)&&(e={user:e[0]}),e=h(e);const n={user:typeof e.user=="object"?e.user.id:e.user};return l.definition.url.replace("{user}",n.user.toString()).replace(/\/+$/,"")+y(r)};l.delete=(e,r)=>({url:l.url(e,r),method:"delete"});const a=(e,r)=>({action:l.url(e,{[r?.mergeQuery?"mergeQuery":"query"]:{_method:"DELETE",...r?.query??r?.mergeQuery??{}}}),method:"post"});a.delete=(e,r)=>({action:l.url(e,{[r?.mergeQuery?"mergeQuery":"query"]:{_method:"DELETE",...r?.query??r?.mergeQuery??{}}}),method:"post"});l.form=a;const q={index:Object.assign(t,t),create:Object.assign(u,u),store:Object.assign(i,i),show:Object.assign(o,o),edit:Object.assign(d,d),update:Object.assign(m,m),destroy:Object.assign(l,l)};export{q as u};
