module.exports=[11307,a=>{"use strict";let b=(0,a.i(5423).default)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);a.s(["FolderOpen",0,b],11307)},55406,a=>{"use strict";var b=a.i(59974);async function c({title:a,defaultPath:d}){let e=await b.api.post("/system/pick-directory",{title:a,...d?{defaultPath:d}:{}});if("selected"===e.status&&e.path)return e.path;if("cancelled"===e.status)return null;throw Error(e.message??"Folder picker is unavailable.")}a.s(["pickDirectoryFromDesktop",0,c])},70297,a=>{"use strict";let b=(0,a.i(5423).default)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);a.s(["RotateCcw",0,b],70297)},91534,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(11307),e=a.i(92241),f=a.i(21218),g=a.i(8212),h=a.i(55406),i=a.i(48558);a.s(["DirectoryPickerField",0,function({id:a,value:j,onChange:k,title:l,placeholder:m="Choose a folder...",defaultPath:n,disabled:o=!1,className:p,inputClassName:q,buttonLabel:r="Choose"}){let[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(null),w=async()=>{t(!0),v(null);try{let a=await (0,h.pickDirectoryFromDesktop)({title:l,defaultPath:j.trim()||n});a&&k(a)}catch(a){v(a instanceof Error?a.message:"Folder picker is unavailable.")}finally{t(!1)}};return(0,b.jsxs)("div",{className:(0,i.cn)("space-y-1",p),children:[(0,b.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,b.jsx)(g.Input,{id:a,value:j,onChange:a=>{k(a.target.value),v(null)},placeholder:m,className:(0,i.cn)("font-mono text-sm",q),disabled:o||s}),(0,b.jsxs)(f.Button,{type:"button",variant:"outline",onClick:w,disabled:o||s,className:"shrink-0 gap-2",children:[s?(0,b.jsx)(e.Loader2,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(d.FolderOpen,{className:"h-4 w-4"}),s?"Opening...":r]})]}),u&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:u})]})}])}];

//# sourceMappingURL=_0vncjim._.js.map