import{R as o}from"./raids-h8ynLJMQ.js";import{C as p}from"./Checkbox-Dc2UYqO9.js";import{n as u}from"./index-DDNMzpZj.js";function n(r){return r.toString(10).replace(/[0123456789]/g,e=>({0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"})[e])}function l(r){return Object.values(r).flatMap(e=>{const t={name:e.name,raids:Object.values(e.raids).flatMap(a=>a.namejp?{name:a.name,namejp:a.namejp}:[])};return t.raids.length>0?t:[]})}const d=[{name:"Standard Raids",data:l(o.CAT_STANDARD)},{name:"Impossible Raids",data:l(o.CAT_IMPOSSIBLE)},{name:"Co-op",data:l(o.CAT_COOP)}],h={components:{Checkbox:p},head:{title:"Granblue.Party - Room Name Generator",desc:"Create the japanese name of the co-op room you want to host",image:"https://www.granblue.party/img/card_roomname.jpg",keywords:"raid, raids, host, coop, train, ubaha, lucifaa, japanese, kanji"},data(){return{current_raid:"",train:"",times:"",rank_higher:"",rank_lower:"",weak_owner:!1,firepower:!1,clipboard_text:""}},methods:{clickCopyURL(){this.clipboard_text=this.getRoomName;let r=this;this.$nextTick().then(e=>{document.getElementById("clipboardInput").select(),document.execCommand("copy"),r.clipboard_text="",r.$store.dispatch("addMessage",{message:"Message copied to clipboard"})})}},computed:{getContent(){return d},getRoomName(){let r=this.current_raid;return this.train.length>0&&(r+=" "+n(this.train)+"連"),this.times.length>0&&(r+=" "+n(this.times)+"回"),this.rank_higher.length>0&&(r+=" "+n(this.rank_higher)+"↑"),this.rank_lower.length>0&&(r+=" "+n(this.rank_lower)+"↓"),this.weak_owner&&(r+=" 主弱"),this.firepower&&(r+=" 火力"),r}}};var _=function(){var e=this,t=e._self._c;return t("div",{staticClass:"flex flex-col"},[t("h1",{staticClass:"self-center mb-8"},[e._v("Room Name Generator")]),t("div",{staticClass:"sticky top-0 bg-tertiary shadow-md"},[t("button",{staticClass:"btn btn-blue mr-2",on:{click:e.clickCopyURL}},[t("fa-icon",{staticClass:"text-xl",attrs:{icon:["fas","share-alt"]}}),e._v(" Copy ")],1),e._v(" Room name: "),t("span",{attrs:{lang:"ja"}},[e._v(e._s(e.getRoomName))])]),t("h2",{staticClass:"py-4"},[e._v("General")]),t("div",{staticClass:"flex flex-col"},[t("span",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.train,expression:"train"}],staticClass:"input input-sm",staticStyle:{width:"5ch"},attrs:{type:"number",min:"1"},domProps:{value:e.train},on:{input:function(a){a.target.composing||(e.train=a.target.value)}}}),e._v("-party train")]),t("span",[e._v("The room owner will host the specified battle "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.times,expression:"times"}],staticClass:"input input-sm",staticStyle:{width:"5ch"},attrs:{type:"number",min:"1"},domProps:{value:e.times},on:{input:function(a){a.target.composing||(e.times=a.target.value)}}}),e._v(" times")]),t("span",[e._v("Participants must be rank "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.rank_higher,expression:"rank_higher"}],staticClass:"input input-sm",staticStyle:{width:"6ch"},attrs:{type:"number",min:"1"},domProps:{value:e.rank_higher},on:{input:function(a){a.target.composing||(e.rank_higher=a.target.value)}}}),e._v(" or higher")]),t("span",[e._v("Participants must be rank "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.rank_lower,expression:"rank_lower"}],staticClass:"input input-sm",staticStyle:{width:"6ch"},attrs:{type:"number",min:"1"},domProps:{value:e.rank_lower},on:{input:function(a){a.target.composing||(e.rank_lower=a.target.value)}}}),e._v(" or below")]),t("span",[t("checkbox",{model:{value:e.weak_owner,callback:function(a){e.weak_owner=a},expression:"weak_owner"}},[e._v("The room owner is weak and wants higher rank players to help him defeat the raid")])],1),t("span",[t("checkbox",{model:{value:e.firepower,callback:function(a){e.firepower=a},expression:"firepower"}},[e._v("The room owner wants firepower and welcomes DPS racers")])],1)]),e._l(e.getContent,function(a){return t("div",{key:a.name},[t("h2",{staticClass:"py-4"},[e._v(e._s(a.name))]),e._l(a.data,function(s,c){return t("div",{key:c,staticClass:"flex flex-col md:flex-row"},[s.name?t("div",{staticClass:"self-center pr-4 whitespace-nowrap"},[e._v(e._s(s.name))]):e._e(),t("div",{staticClass:"flex flex-row flex-wrap select-none"},e._l(s.raids,function(i,m){return t("a",{key:m,staticClass:"p-1 cursor-pointer",on:{click:function(w){e.current_raid=i.namejp}}},[t("div",{staticClass:"p-2 rounded flex flex-col items-center",class:e.current_raid==i.namejp?"bg-inverse text-inverse":"bg-secondary text-primary hover:bg-tertiary hover:text-primary"},[e._v(e._s(i.name))])])}),0)])})],2)}),t("div",{staticClass:"py-4"},[e._v(" More terms can be found on "),t("a",{attrs:{href:"https://gbf.wiki/Co-op_Terms",target:"_blank"}},[e._v("gbf.wiki/Co-op_Terms "),t("fa-icon",{staticClass:"text-sm",attrs:{icon:["fas","external-link-alt"]}})],1),e._v(". ")]),t("input",{directives:[{name:"show",rawName:"v-show",value:e.clipboard_text.length>0,expression:"clipboard_text.length > 0"}],attrs:{id:"clipboardInput",readonly:"",type:"text"},domProps:{value:e.clipboard_text}})],2)},f=[],v=u(h,_,f,!1,null,null);const x=v.exports;export{x as default};