import{r as a,d as i,h as t,e as o}from"./p-9b6cc562.js";const r=class{constructor(t){a(this,t),this.floodteamFlip=i(this,"floodteamFlip",7),this.frontImage=void 0,this.backImage=void 0,this.flipped=!1,this.hideRefresh=!1,this.isFlipped=!1}async flip(a){a&&(a.preventDefault(),a.stopPropagation()),this.flipped=!this.flipped,this.floodteamFlip.emit({flipped:this.flipped})}onSwipeLeft(a){a.target&&a.target.className&&a.target.className.indexOf("flip-card")>=0&&this.flip()}onSwipeRight(a){a.target&&a.target.className&&a.target.className.indexOf("flip-card")>=0&&this.flip()}render(){return t("div",{class:this.flipped?"flip-card flipped":"flip-card","data-swipe-threshold":"10"},t("slot",{name:"before"}),t("div",{class:"flip-card-inner"},t("div",{class:"flip-card-front",style:this.frontImage?{backgroundImage:`url('${this.frontImage}')`}:null},t("slot",{name:"front"})),t("div",{class:"flip-card-back",style:this.backImage?{backgroundImage:`url('${this.backImage}')`}:null},t("slot",{name:"back"}))),!this.hideRefresh&&t("span",{class:"badge-top-left",onClick:a=>this.flip(a)},t("ion-icon",{name:"refresh"})),t("slot",{name:"after"}))}get flipCardEl(){return o(this)}};r.style="floodteam-flip-card{font-family:var(\n    --floodteam-flip-card-font-family,\n    var(--ion-font-family, Arial, Helvetica, sans-serif)\n  )}floodteam-flip-card .flip-card{background-color:transparent;perspective:1000px;display:block;margin:0 auto}floodteam-flip-card .flip-card-inner{position:relative;width:100%;height:100%;text-align:center;transition:all 0.8s;transform-style:preserve-3d;box-shadow:5px 5px 8px #888}floodteam-flip-card .badge-top-left{background-color:rgba(0, 0, 0, 0.6);color:#fff;position:absolute;top:0;left:0;padding:5px 10px;border-radius:0 0 5px 0;font-size:0.75em;text-transform:uppercase;z-index:10}floodteam-flip-card .flip-card.flipped .flip-card-inner{transform:rotateY(180deg);box-shadow:-5px 5px 8px #888}floodteam-flip-card .flip-card-front,floodteam-flip-card .flip-card-back{position:absolute;width:100%;height:100%;backface-visibility:hidden;background-size:cover;background-position:center}floodteam-flip-card .flip-card-front{background-color:#bbb}floodteam-flip-card .flip-card-back{background-color:#bbb;transform:rotateY(180deg)}";export{r as floodteam_flip_card}