var __awaiter=this&&this.__awaiter||function(i,t,e,n){function a(i){return i instanceof e?i:new e((function(t){t(i)}))}return new(e||(e=Promise))((function(e,o){function r(i){try{c(n.next(i))}catch(i){o(i)}}function s(i){try{c(n["throw"](i))}catch(i){o(i)}}function c(i){i.done?e(i.value):a(i.value).then(r,s)}c((n=n.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(i){return function(t){return c([i,t])}}function c(r){if(n)throw new TypeError("Generator is already executing.");while(e)try{if(n=1,a&&(o=r[0]&2?a["return"]:r[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;if(a=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;a=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){e.label=r[1];break}if(r[0]===6&&e.label<o[1]){e.label=o[1];o=r;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(r);break}if(o[2])e.ops.pop();e.trys.pop();continue}r=t.call(i,e)}catch(i){r=[6,i];a=0}finally{n=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-ecdfb761.js";import{t as takvimDailyCalendarI18nDefault}from"./i18n-a73eeab0.js";import{I as InvalidationAction,N as NotificationAction}from"./actions-b9a0f808.js";import{g as generateActionEmitData}from"./action-util-f72a13be.js";import"./i18n-745d0676.js";import"./i18n-27a6b633.js";import"./i18n-02d8c6e2.js";var DvnAppViewTakvimDailyCalendarView=function(){function i(i){registerInstance(this,i);this.invalidation=createEvent(this,"invalidation",7);this.notification=createEvent(this,"notification",7);this.action=createEvent(this,"action",7)}i.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(t){switch(t.label){case 0:i=this;return[4,this.apiSozluk.getContent(this.view.i18nEntryId,takvimDailyCalendarI18nDefault)];case 1:i.strings=t.sent();return[2]}}))}))};i.prototype.onAction=function(i){var t=this;var e,n;var a=this.view;if(a.availableTimePickerConfig.successNavigationAction){this.createdMeeting=i.detail}(n=(e=a.availableTimePickerConfig.events)===null||e===void 0?void 0:e.success)===null||n===void 0?void 0:n.forEach((function(i){if(i instanceof InvalidationAction){t.invalidation.emit(i)}if(i instanceof NotificationAction){t.notification.emit(i)}}))};i.prototype.render=function(){var i=this;var t=this.strings;return h(Host,{class:"d-flex flex-grow-1",style:{overflow:"hidden"}},h("takvim-daily-calendar",{apiData:this.apiData,apiTakvim:this.apiTakvim,strings:this.strings,user:this.user,userSettings:this.userSettings,membershipConfigId:this.membership.config._id,calendarConfigId:this.view.table._id,membershipConfigIdToGroupMeetings:this.view.membershipConfigIdToGroupMeetings,membershipConfigIdToViewOnMeetings:this.view.membershipConfigIdToViewOnMeetings}),h("dvn-dialog",{title:t.meetingIsScheduled,shown:!!this.createdMeeting,onDismiss:function(){return i.createdMeeting=undefined}},h("div",{slot:"actions"},h("dvn-button",{view:"flat",onClick:function(){return i.createdMeeting=undefined}},t.stayOnPage),h("dvn-button",{tint:"primary",view:"flat",onClick:function(){i.action.emit(generateActionEmitData({},i.createdMeeting,i.view.availableTimePickerConfig.successNavigationAction));i.createdMeeting=undefined}},t.goToMeetingPage))))};return i}();export{DvnAppViewTakvimDailyCalendarView as dvn_app_view_takvim_daily_calendar_view};