import{G as y,J as w,e as g,_ as b,r as o,o as k,f as v,w as d,a as r,n as s,g as a,t as l}from"./index-696ae00c.js";import{f as i,q as D}from"./decor-1d29d0cd.js";function c(e,n){if(e==="supplement")return i(n,["struct_2","product","DSLD ID"],"").length>=1;if(e==="food")return i(n,["struct_2","product","FDC ID"],"").length>=1;throw new Error(`Kind ${e} was not accounted for.`)}function $(e){try{if(typeof e.struct_2.product.name=="string")return e.struct_2.product.name}catch(n){console.warn(n)}return""}function x(e){try{if(typeof e.struct_2.brand.name=="string")return e.struct_2.brand.name}catch(n){console.warn(n)}return""}function q(e,n){try{return`/@/${i(n)}/`+i(e.emblem)}catch(u){console.warn(u)}return""}const C=e=>c("food",e)?"food":c("supplement",e)?"supplement":"",S={components:{s_curtain:y,router_link_scenery:w,quantity_chooser:D},props:{treasure:{default(){return{}},type:Object}},computed:{kind(){try{return C(this.treasure)}catch{}return""}},data(){return{}},methods:{_get:g,find_name:$,find_stats_link:q,find_brand_name:x},mounted(){}},B=S,I={food_or_supp_summary_h1:"",style:{margin:0,padding:0,fontSize:"1.0em"}},j=r("div",{style:{height:"5px"}},null,-1),z={style:{position:"relative",margin:0}};function N(e,n,u,V,E,F){const _=o("router_link_scenery"),p=o("s_curtain"),m=o("quantity_chooser"),f=o("lounge");return k(),v(f,null,{default:d(({palette:h,terrain:t})=>[r("div",{style:s({display:"flex",width:"100%",alignItems:t.width<t.mobile_nav_width?"end":"center",justifyContent:t.width<t.mobile_nav_width?"right":"space-between",flexDirection:t.width<t.mobile_nav_width?"column":"row"})},[r("div",{style:s({width:t.width<t.mobile_nav_width?"100%":"70%"})},[r("div",null,[a(_,{name:e._get(e.treasure,["nature","kind"],""),params:{emblem:e.treasure.emblem},has_slot:!0,style:s({display:"inline-block",width:t.width<t.mobile_nav_width?"100%":"calc(100% - 5%)"}),styles:{inside:{}}},{default:d(()=>[r("h1",I,l(e._get(e.treasure,["nature","identity","name"],"")),1)]),_:2},1032,["name","params","style"])]),j,r("div",null,[r("div",{style:s({display:"inline-block",position:"relative",padding:"4px 8px",border:"1px solid "+h[6],borderRadius:"4px"})},[a(p),r("p",z,l(e._get(e.treasure,["nature","kind"],"")),1)],4)])],4),a(m,{kind:e._get(e.treasure,["nature","kind"],""),treasure:e.treasure},null,8,["kind","treasure"])],4)]),_:1})}const K=b(B,[["render",N]]);export{c as i,K as s};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 11932 characters]
