import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-ecdfb761.js";import{a as getEmbeddedTranslation}from"./mentorinty-bridge-api-f70621dd.js";import{g as getAvailableTimePickerViewConfig}from"./wrapper-util-2baa8a90.js";import"./apiBase-648a161d.js";import"./data-transfer-field-2f305919.js";import"./BaseField-0b01dc2c.js";import"./filter-cbaa3d7d.js";import"./FieldModelGenerator-03c7516c.js";import"./reference-field-a5b414d1.js";import"./index-61dcd269.js";import"./FieldGenerator-3ae403b2.js";import"./date-1bc489bd.js";import"./index-4e451db4.js";import"./index-32d8b974.js";import"./index-23baeeef.js";import"./index-09efdc01.js";import"./index-150b6a59.js";import"./index-5f14b4fc.js";import"./attachment-d13ad547.js";import"./data-model-f7ccf826.js";import"./membership-24db029a.js";import"./table-config-3820fb34.js";import"./string-3065a411.js";import"./User-9f1f4513.js";import"./CalendarConfig-f8d4a70d.js";import"./card-list-view-config-56edd30b.js";import"./view-config-2fc2ba10.js";import"./detail-view-config-47244869.js";import"./takvim-available-time-picker-view-config-051fa55b.js";import"./common-wrapper-util-62bbacf2.js";import"./models-3a85e626.js";var mentornityScheduleMeetingButtonOnCardCss="mentornity-schedule-meeting-button-on-card{height:326px;background:var(--color-background-secondary);padding:calc(2 * var(--spacing-unit)) 0 0 calc(3 * var(--spacing-unit));border-bottom-left-radius:var(--card-corner-radius);border-bottom-right-radius:var(--card-corner-radius)}mentornity-schedule-meeting-button-on-card .title{font-size:var(--font-size-small);margin-left:calc(1 * var(--spacing-unit));color:var(--color-text-secondary)}mentornity-schedule-meeting-button-on-card takvim-available-time-picker>dvn-card{--color-elevated-item-background:var(--color-background-secondary)}mentornity-schedule-meeting-button-on-card takvim-available-time-picker>dvn-date-picker>.calendar-container{--color-elevated-item-background:var(--color-background-secondary)}mentornity-schedule-meeting-button-on-card takvim-available-time-picker-selected-day>dvn-card{--color-elevated-item-background:var(--color-background-secondary)}";var MentornityScheduleMeetingButtonOnCard=function(){function e(e){registerInstance(this,e);this.action=createEvent(this,"action",7);this.shouldShow=false}e.prototype.componentWillLoad=function(){var e=this;this.shouldShow=isInViewport(this.el);this.currentTimePositionUpdater=setInterval((function(){if(e.shouldShow){return}e.shouldShow=isInViewport(e.el)}),1e3)};e.prototype.disconnectedCallback=function(){clearInterval(this.currentTimePositionUpdater)};e.prototype.render=function(){var e;if(!this.shouldShow){return h(Host,{class:"d-flex flex-grow-1 align-items-center justify-content-center"},h("dvn-progress",{indefinite:true,tint:"primary"}))}var t=this.item;var i=((e=this.meta)===null||e===void 0?void 0:e.language)||"en";var r=this.meta||{},n=r.mentornityBridgeApi,o=r.apiSozluk,a=r.guestToPassToAvailableTimePickerAsCurrentUser,d=r.userSettings,s=r.membership;return h(Host,{class:"d-flex flex-column flex-grow-1"},h("div",{class:"title"},getEmbeddedTranslation(i,"getMeeting").toLocaleUpperCase()),h("dvn-app-view-takvim-available-time-picker-view",{apiData:n,apiSozluk:o,apiTakvim:n,apiUye:n,user:a,userSettings:d,membership:s,params:{viewedUserMembership:t},view:getAvailableTimePickerViewConfig(n.organisationConfig)}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();function isInViewport(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}MentornityScheduleMeetingButtonOnCard.style=mentornityScheduleMeetingButtonOnCardCss;export{MentornityScheduleMeetingButtonOnCard as mentornity_schedule_meeting_button_on_card};