1import{d as m,r as c,H as _,y as p,v as u,e as b,q as g,a as h,t as v,b as k}from"./index-CLUkG7Y1.js";import{_ as y}from"./PageFormLayout.vue_vue_type_script_setup_true_lang-DIZiXbi6.js";import{_ as C}from"./TrainingFormInner.vue_vue_type_script_setup_true_lang-C-dluW4c.js";const x=["disabled"],V=m({__name:"TrainingCreatePage",setup(B){const n=k(),r=c(null),{create:d}=_("trainings","*"),e=c(!1);async function f(){var s,l;const t=(l=(s=r.value)==null?void 0:s.getModel)==null?void 0:l.call(s);if(!t)return;e.value=!0;const{data:a,error:o}=await d(t);if(e.value=!1,o){alert(o.message??"Uloženà se nezdaÅilo.");return}const i=a==null?void 0:a.id;i?n.push({name:"dashboard-trainings-detail",params:{id:i}}):n.push({name:"dashboard-trainings"})}return(t,a)=>(b(),p(y,{title:"Nové Å¡kolenÃ","back-to":{name:"dashboard-trainings"}},{"actions-left":u(()=>[h("button",{class:"btn btn-primary",disabled:e.value,onClick:f},v(e.value?"Ukládámâ¦":"Uložit"),9,x)]),default:u(()=>[g(C,{ref_key:"inner",ref:r},null,512)]),_:1}))}});export{V as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.