import{ag as p,q as e,j as t,T as s}from"./main-D6SjkSWq.js";import{u as n}from"./use-create-track-form-YB1VLkNn.js";import{T as c}from"./track-form-BXwKM7r0.js";import{g as d}from"./track-link-BvulRuhc.js";import{C as u}from"./crupdate-resource-layout-IY4TseVy.js";import{F as k}from"./file-upload-provider-C966C2x1.js";import"./paginated-resources-C0CNliR6.js";import"./external-ids-fields-CaZSeG7G.js";import"./FileUpload-UbHUpO6u.js";import"./image-selector-CCexW8Lt.js";import"./use-active-upload-DElCZe_0.js";import"./open-upload-window-DxsWEG58.js";import"./uploaded-file-Dt7HVOVK.js";import"./extension-from-filename-O0XMuZye.js";import"./AddAPhoto-BPK-B3uy.js";import"./file-input-config-DrcTpI3-.js";import"./pretty-bytes-bO14ePu9.js";import"./generate-waveform-data-BFwf5N3g.js";import"./form-chip-field-CRtNtvyR.js";import"./input-CalT3wzl.js";import"./chip-list-CvrJkGlz.js";import"./chevron-down-BqXy_cI5.js";import"./genre-B_3ZyEC1.js";import"./form-normalized-model-chip-field-D_4zoyut.js";import"./use-normalized-models-D9FqQyBj.js";import"./normalized-model-field-BnOhtjjx.js";import"./select-BkmhiFLy.js";import"./combobox-end-adornment-Btuckat_.js";import"./Edit-Cysuqwzc.js";import"./skeleton-3NNrk_-o.js";import"./formatted-duration-DCG54VKZ.js";import"./use-current-date-time-jPIHAlBp.js";import"./datatable-page-with-header-layout-BuTOEIJh.js";import"./dashboard-layout-context-C1ErlVWg.js";import"./traditional-GTMgz7Xu.js";function V(){const o=p(),{pathname:m}=e(),{form:a,createTrack:i}=n({onTrackCreated:r=>{m.includes("admin")?o(`/admin/tracks/${r.track.id}/edit`):o(d(r.track))}});return t.jsx(u,{form:a,onSubmit:r=>{i.mutate(r)},title:t.jsx(s,{message:"Add new track"}),isLoading:i.isPending,disableSaveWhenNotDirty:!0,children:t.jsx(k,{children:t.jsx(c,{showExternalIdFields:!0})})})}export{V as Component};
