import{J as g,h as b,u as k,_ as v,r,o as u,f as d,w as l,a as o,n as s,b as c,t as _,j as D}from"./2.3.1_index.js";import{f as i}from"./2.3.1_string.js";import{q as $}from"./2.3.1_decor15.js";function m(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 C(e){try{if(typeof e.struct_2.product.name=="string")return e.struct_2.product.name}catch(n){console.warn(n)}return""}function q(e){try{if(typeof e.struct_2.brand.name=="string")return e.struct_2.brand.name}catch(n){console.warn(n)}return""}function x(e,n){try{return`/@/${i(n)}/`+i(e.emblem)}catch(a){console.warn(a)}return""}const B=e=>m("food",e)?"food":m("supplement",e)?"supplement":"",S={components:{s_curtain:g,router_link_scenery:b,quantity_chooser:$},props:{show_change_amount:{default:!0,type:Boolean},treasure:{default(){return{}},type:Object}},computed:{kind(){try{return B(this.treasure)}catch{}return""}},data(){return{}},methods:{_get:k,find_name:C,find_stats_link:x,find_brand_name:q},mounted(){}},j=S,I={food_or_supp_summary_h1:"",style:{margin:0,padding:0,fontSize:"1.0em"}},N=o("div",{style:{height:"5px"}},null,-1),V={style:{position:"relative",margin:0}};function z(e,n,a,E,F,J){const p=r("router_link_scenery"),h=r("s_curtain"),f=r("quantity_chooser"),y=r("lounge");return u(),d(y,null,{default:l(({palette:w,terrain:t})=>[o("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"})},[o("div",{style:s({width:t.width<t.mobile_nav_width?"100%":"70%"})},[o("div",null,[c(p,{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:l(()=>[o("h1",I,_(e._get(e.treasure,["nature","identity","name"],"")),1)]),_:2},1032,["name","params","style"])]),N,o("div",null,[o("div",{style:s({display:"inline-block",position:"relative",padding:"4px 8px",border:"1px solid "+w[6],borderRadius:"4px"})},[c(h),o("p",V,_(e._get(e.treasure,["nature","kind"],"")),1)],4)])],4),e.show_change_amount?(u(),d(f,{key:0,kind:e._get(e.treasure,["nature","kind"],""),treasure:e.treasure},null,8,["kind","treasure"])):D("",!0)],4)]),_:1})}const R=v(j,[["render",z]]);export{m as i,R as s};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 12572 characters]
